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()
|
||||
local defaults = require("outline.config").defaults
|
||||
local opts = {
|
||||
symbols = {},
|
||||
symbol_blacklist = {},
|
||||
symbols = {
|
||||
icons = {},
|
||||
filter = LazyVim.config.kind_filter,
|
||||
},
|
||||
keymaps = {
|
||||
up_and_jump = "<up>",
|
||||
down_and_jump = "<down>",
|
||||
},
|
||||
}
|
||||
local filter = LazyVim.config.kind_filter
|
||||
|
||||
if type(filter) == "table" then
|
||||
filter = filter.default
|
||||
if type(filter) == "table" then
|
||||
for kind, symbol in pairs(defaults.symbols) do
|
||||
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
|
||||
for kind, symbol in pairs(defaults.symbols.icons) do
|
||||
opts.symbols.icons[kind] = {
|
||||
icon = LazyVim.config.icons.kinds[kind] or symbol.icon,
|
||||
hl = symbol.hl,
|
||||
}
|
||||
end
|
||||
return opts
|
||||
end,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue