fix(lsp): symbols when 'lsp.protocol.CompletionItemKind' is default

main
bhagwan 2 years ago
parent 523962ae53
commit 343322108d

@ -753,6 +753,8 @@ require'fzf-lua'.setup {
symbol_style = 1, -- style for document/workspace symbols
-- false: disable, 1: icon+kind
-- 2: icon only, 3: kind only
-- NOTE: icons are extracted from
-- vim.lsp.protocol.CompletionItemKind
-- colorize using nvim-cmp's CmpItemKindXXX highlights
-- can also be set to 'TS' for treesitter highlights ('TSProperty', etc)
-- or 'false' to disable highlighting

@ -798,6 +798,8 @@ Consult the list below for available settings:
symbol_style = 1, -- style for document/workspace symbols
-- false: disable, 1: icon+kind
-- 2: icon only, 3: kind only
-- NOTE: icons are extracted from
-- vim.lsp.protocol.CompletionItemKind
-- colorize using nvim-cmp's CmpItemKindXXX highlights
-- can also be set to 'TS' for treesitter highlights ('TSProperty', etc)
-- or 'false' to disable highlighting

@ -392,7 +392,13 @@ local function gen_sym2style_map(opts)
-- style==3: "<kind>"
local s = nil
if opts.symbol_style == 1 then
s = ("%s %s"):format(icon, k)
-- if icons weren't set by the user
-- icon will match the kind
if icon ~= k then
s = ("%s %s"):format(icon, k)
else
s = k
end
elseif opts.symbol_style == 2 then
s = icon
elseif opts.symbol_style == 3 then

Loading…
Cancel
Save