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 M = {}
|
||||||
|
|
||||||
|
local navic = require("nvim-navic")
|
||||||
|
|
||||||
M.setup = function()
|
M.setup = function()
|
||||||
local signs = {
|
local signs = {
|
||||||
{ name = "DiagnosticSignError", text = "" },
|
{ name = "DiagnosticSignError", text = "" },
|
||||||
@@ -106,6 +108,10 @@ M.on_attach = function(client, bufnr)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
|
navic.attach(client, bufnr)
|
||||||
|
end
|
||||||
|
|
||||||
-- TypeScript
|
-- TypeScript
|
||||||
if client.name == "tsserver" then
|
if client.name == "tsserver" then
|
||||||
client.server_capabilities.documentFormattingProvider = false
|
client.server_capabilities.documentFormattingProvider = false
|
||||||
@@ -158,6 +164,9 @@ if not status_ok then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set Winbar to nvim-static
|
||||||
|
vim.o.winbar = "%{%v:lua.require'nvim-navic'.get_location()%}"
|
||||||
|
|
||||||
M.capabilities = cmp_nvim_lsp.default_capabilities(capabilities)
|
M.capabilities = cmp_nvim_lsp.default_capabilities(capabilities)
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ return packer.startup(function(use)
|
|||||||
use("ray-x/sad.nvim") -- Find & Replace
|
use("ray-x/sad.nvim") -- Find & Replace
|
||||||
use("gorbit99/codewindow.nvim") -- Minimap
|
use("gorbit99/codewindow.nvim") -- Minimap
|
||||||
use("simrat39/symbols-outline.nvim") -- Symbols Outline
|
use("simrat39/symbols-outline.nvim") -- Symbols Outline
|
||||||
|
use("SmiteshP/nvim-navic") -- Statusline current context
|
||||||
|
|
||||||
-- Editing Files
|
-- Editing Files
|
||||||
use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter
|
use("windwp/nvim-autopairs") -- Autopairs, integrates with both cmp and treesitter
|
||||||
|
|||||||
Reference in New Issue
Block a user