feat nvim: add document_symbols neotree
This commit is contained in:
parent
734967c967
commit
816c2cddec
@ -391,6 +391,87 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
document_symbols = {
|
||||||
|
follow_cursor = true,
|
||||||
|
client_filters = "first",
|
||||||
|
renderers = {
|
||||||
|
root = {
|
||||||
|
{"indent"},
|
||||||
|
{"icon", default="C" },
|
||||||
|
{"name", zindex = 10},
|
||||||
|
},
|
||||||
|
symbol = {
|
||||||
|
{"indent", with_expanders = true},
|
||||||
|
{"kind_icon", default="?" },
|
||||||
|
{"container",
|
||||||
|
content = {
|
||||||
|
{"name", zindex = 10},
|
||||||
|
{"kind_name", zindex = 20, align = "right"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
["<cr>"] = "jump_to_symbol",
|
||||||
|
["o"] = "jump_to_symbol",
|
||||||
|
["A"] = "noop", -- also accepts the config.show_path and config.insert_as options.
|
||||||
|
["d"] = "noop",
|
||||||
|
["y"] = "noop",
|
||||||
|
["x"] = "noop",
|
||||||
|
["p"] = "noop",
|
||||||
|
["c"] = "noop",
|
||||||
|
["m"] = "noop",
|
||||||
|
["a"] = "noop",
|
||||||
|
["/"] = "filter",
|
||||||
|
["f"] = "filter_on_submit",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
custom_kinds = {
|
||||||
|
-- define custom kinds here (also remember to add icon and hl group to kinds)
|
||||||
|
-- ccls
|
||||||
|
-- [252] = 'TypeAlias',
|
||||||
|
-- [253] = 'Parameter',
|
||||||
|
-- [254] = 'StaticMethod',
|
||||||
|
-- [255] = 'Macro',
|
||||||
|
},
|
||||||
|
kinds = {
|
||||||
|
Unknown = { icon = "?", hl = "" },
|
||||||
|
Root = { icon = "", hl = "NeoTreeRootName" },
|
||||||
|
File = { icon = "", hl = "Tag" },
|
||||||
|
Module = { icon = "", hl = "Exception" },
|
||||||
|
Namespace = { icon = "", hl = "Include" },
|
||||||
|
Package = { icon = "", hl = "Label" },
|
||||||
|
Class = { icon = "", hl = "Include" },
|
||||||
|
Method = { icon = "", hl = "Function" },
|
||||||
|
Property = { icon = "", hl = "@property" },
|
||||||
|
Field = { icon = "", hl = "@field" },
|
||||||
|
Constructor = { icon = "", hl = "@constructor" },
|
||||||
|
Enum = { icon = "", hl = "@number" },
|
||||||
|
Interface = { icon = "", hl = "Type" },
|
||||||
|
Function = { icon = "", hl = "Function" },
|
||||||
|
Variable = { icon = "", hl = "@variable" },
|
||||||
|
Constant = { icon = "", hl = "Constant" },
|
||||||
|
String = { icon = "", hl = "String" },
|
||||||
|
Number = { icon = "", hl = "Number" },
|
||||||
|
Boolean = { icon = "", hl = "Boolean" },
|
||||||
|
Array = { icon = "", hl = "Type" },
|
||||||
|
Object = { icon = "", hl = "Type" },
|
||||||
|
Key = { icon = "", hl = "" },
|
||||||
|
Null = { icon = "", hl = "Constant" },
|
||||||
|
EnumMember = { icon = "", hl = "Number" },
|
||||||
|
Struct = { icon = "", hl = "Type" },
|
||||||
|
Event = { icon = "", hl = "Constant" },
|
||||||
|
Operator = { icon = "", hl = "Operator" },
|
||||||
|
TypeParameter = { icon = "", hl = "Type" },
|
||||||
|
|
||||||
|
-- ccls
|
||||||
|
-- TypeAlias = { icon = ' ', hl = 'Type' },
|
||||||
|
-- Parameter = { icon = ' ', hl = '@parameter' },
|
||||||
|
-- StaticMethod = { icon = ' ', hl = 'Function' },
|
||||||
|
-- Macro = { icon = ' ', hl = 'Macro' },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
-- 自行加入的
|
-- 自行加入的
|
||||||
source_selector = {
|
source_selector = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user