add: symbol outline

This commit is contained in:
asep.komarudin 2024-06-28 17:34:17 +07:00
parent ec8d701b71
commit 524bfc707b
3 changed files with 47 additions and 1 deletions

View file

@ -247,6 +247,47 @@ if pcode.active_java_config.active then
{ "<Leader>TS", function() require("neotest").run.stop() end, desc = "Stop" },
},
},
{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
config = function()
require("symbols-outline").setup({
symbols = {
File = { icon = "󰈔", hl = "@text.uri" },
Module = { icon = "", hl = "@namespace" },
Namespace = { icon = "󰅪", hl = "@namespace" },
Package = { icon = "", hl = "@namespace" },
Class = { icon = "𝓒", hl = "@type" },
Method = { icon = "ƒ", hl = "@method" },
Property = { icon = "", hl = "@method" },
Field = { icon = "", hl = "@field" },
Constructor = { icon = "", hl = "@constructor" },
Enum = { icon = "", hl = "@type" },
Interface = { icon = "", hl = "@type" },
Function = { icon = "", hl = "@function" },
Variable = { icon = "", hl = "@constant" },
Constant = { icon = "", hl = "@constant" },
String = { icon = "𝓐", hl = "@string" },
Number = { icon = "#", hl = "@number" },
Boolean = { icon = "󰨙 ", hl = "@boolean" },
Array = { icon = "", hl = "@constant" },
Object = { icon = "⦿", hl = "@type" },
Key = { icon = "🔐", hl = "@type" },
Null = { icon = "NULL", hl = "@type" },
EnumMember = { icon = "", hl = "@field" },
Struct = { icon = "𝓢", hl = "@type" },
Event = { icon = "🗲", hl = "@type" },
Operator = { icon = "+", hl = "@operator" },
TypeParameter = { icon = "𝙏", hl = "@parameter" },
Component = { icon = "󰅴", hl = "@function" },
Fragment = { icon = "󰅴", hl = "@constant" },
},
})
end,
keys = {
{ "<leader>S", "<cmd>SymbolsOutline<cr>", desc = "Toggle Outline" },
},
},
}
end