mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nvim): install navic plugin
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
local M = {}
|
||||
|
||||
local navic = require("nvim-navic")
|
||||
|
||||
M.setup = function()
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
@@ -106,6 +108,10 @@ M.on_attach = function(client, bufnr)
|
||||
})
|
||||
end
|
||||
|
||||
if client.server_capabilities.documentSymbolProvider then
|
||||
navic.attach(client, bufnr)
|
||||
end
|
||||
|
||||
-- TypeScript
|
||||
if client.name == "tsserver" then
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
@@ -158,6 +164,9 @@ if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- Set Winbar to nvim-static
|
||||
vim.o.winbar = "%{%v:lua.require'nvim-navic'.get_location()%}"
|
||||
|
||||
M.capabilities = cmp_nvim_lsp.default_capabilities(capabilities)
|
||||
|
||||
return M
|
||||
|
||||
@@ -143,6 +143,7 @@ return packer.startup(function(use)
|
||||
use("ray-x/sad.nvim") -- Find & Replace
|
||||
use("gorbit99/codewindow.nvim") -- Minimap
|
||||
use("simrat39/symbols-outline.nvim") -- Symbols Outline
|
||||
use("SmiteshP/nvim-navic") -- Statusline current context
|
||||
|
||||
-- Editing Files
|
||||
use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter
|
||||
|
||||
Reference in New Issue
Block a user