From 487d44c04959fe7069498316b7d610a20ac17811 Mon Sep 17 00:00:00 2001 From: ~hedy Date: Fri, 5 Jul 2024 20:27:50 +0800 Subject: [PATCH] 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. --- lua/lazyvim/plugins/extras/editor/outline.lua | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/outline.lua b/lua/lazyvim/plugins/extras/editor/outline.lua index 575d6ec6..e9aad2a0 100644 --- a/lua/lazyvim/plugins/extras/editor/outline.lua +++ b/lua/lazyvim/plugins/extras/editor/outline.lua @@ -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 = "", down_and_jump = "", }, } - 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,