diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-24 00:14:04 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-24 00:14:04 +0200 |
| commit | 966d12ac730c83da90d60ab24eae539b2ea69441 (patch) | |
| tree | 702f5f832796b572d0faee31c0eb15507e91f49a /lua/plugins/navic.lua | |
| parent | 2a8020a2e9b7ef2ee77ddee14892127a4eb95187 (diff) | |
| download | dotfiles-966d12ac730c83da90d60ab24eae539b2ea69441.tar.gz dotfiles-966d12ac730c83da90d60ab24eae539b2ea69441.zip | |
Update/Overhaul
Diffstat (limited to 'lua/plugins/navic.lua')
| -rwxr-xr-x[-rw-r--r--] | lua/plugins/navic.lua | 97 |
1 files changed, 49 insertions, 48 deletions
diff --git a/lua/plugins/navic.lua b/lua/plugins/navic.lua index a95485d..a574d5c 100644..100755 --- a/lua/plugins/navic.lua +++ b/lua/plugins/navic.lua @@ -1,50 +1,51 @@ -local navic = require("nvim-navic") ---local on_attach = function(client, bufnr) --- if client.server_capabilities.documentSymbolProvider then --- navic.attach(client, bufnr) --- end ---end +local M = {} ---require("lspconfig").clangd.setup { --- on_attach = on_attach ---} +function M.setup() + local ok, navic = pcall(require, "nvim-navic") + if not ok or not navic then + return false + end -navic.setup { - icons = { - File = " ", - Module = " ", - Namespace = " ", - Package = " ", - Class = " ", - Method = " ", - Property = " ", - Field = " ", - Constructor = " ", - Enum = "練", - Interface = "練", - Function = " ", - Variable = " ", - Constant = " ", - String = " ", - Number = " ", - Boolean = "◩ ", - Array = " ", - Object = " ", - Key = " ", - Null = "ﳠ ", - EnumMember = " ", - Struct = " ", - Event = " ", - Operator = " ", - TypeParameter = " ", - }, - lsp = { - auto_attach = true, - --preference = nil, - }, - highlight = false, - separator = " > ", - depth_limit = 0, - depth_limit_indicator = "..", - safe_output = true -} + navic.setup({ + icons = { + File = " ", + Module = " ", + Namespace = " ", + Package = " ", + Class = " ", + Method = " ", + Property = " ", + Field = " ", + Constructor = " ", + Enum = "練", + Interface = "練", + Function = " ", + Variable = " ", + Constant = " ", + String = " ", + Number = " ", + Boolean = "◩ ", + Array = " ", + Object = " ", + Key = " ", + Null = "ﳠ ", + EnumMember = " ", + Struct = " ", + Event = " ", + Operator = " ", + TypeParameter = " " + }, + highlight = false, + separator = " > ", + depth_limit = 0, + depth_limit_indicator = "..", + safe_output = true, + lsp = { + auto_attach = true + } + }) + + return true +end + +return M |
