mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(outline): use the correct symbols and filter config format
The symbols-outline extra was removed in favor of outline.nvim, but the configuration for symbols is not backwards-compatible (https://github.com/hedyhli/outline.nvim/issues/12). This fixes the configuration for the symbols icons and filter to be usable by outline.nvim.
This commit is contained in:
parent
76b41cdec4
commit
487d44c049
1 changed files with 9 additions and 16 deletions
|
|
@ -14,28 +14,21 @@ return {
|
||||||
opts = function()
|
opts = function()
|
||||||
local defaults = require("outline.config").defaults
|
local defaults = require("outline.config").defaults
|
||||||
local opts = {
|
local opts = {
|
||||||
symbols = {},
|
symbols = {
|
||||||
symbol_blacklist = {},
|
icons = {},
|
||||||
|
filter = LazyVim.config.kind_filter,
|
||||||
|
},
|
||||||
keymaps = {
|
keymaps = {
|
||||||
up_and_jump = "<up>",
|
up_and_jump = "<up>",
|
||||||
down_and_jump = "<down>",
|
down_and_jump = "<down>",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
local filter = LazyVim.config.kind_filter
|
|
||||||
|
|
||||||
if type(filter) == "table" then
|
for kind, symbol in pairs(defaults.symbols.icons) do
|
||||||
filter = filter.default
|
opts.symbols.icons[kind] = {
|
||||||
if type(filter) == "table" then
|
icon = LazyVim.config.icons.kinds[kind] or symbol.icon,
|
||||||
for kind, symbol in pairs(defaults.symbols) do
|
hl = symbol.hl,
|
||||||
opts.symbols[kind] = {
|
}
|
||||||
icon = LazyVim.config.icons.kinds[kind] or symbol.icon,
|
|
||||||
hl = symbol.hl,
|
|
||||||
}
|
|
||||||
if not vim.tbl_contains(filter, kind) then
|
|
||||||
table.insert(opts.symbol_blacklist, kind)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue