mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
refactor(navic): move navic to ui
This commit is contained in:
parent
d74759de76
commit
bb388a28ff
2 changed files with 14 additions and 4 deletions
|
@ -9,7 +9,6 @@ return {
|
||||||
"mason.nvim",
|
"mason.nvim",
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"SmiteshP/nvim-navic",
|
|
||||||
},
|
},
|
||||||
---@type lspconfig.options
|
---@type lspconfig.options
|
||||||
servers = nil,
|
servers = nil,
|
||||||
|
@ -18,9 +17,6 @@ return {
|
||||||
require("lazyvim.util").on_attach(function(client, buffer)
|
require("lazyvim.util").on_attach(function(client, buffer)
|
||||||
require("lazyvim.plugins.lsp.format").on_attach(client, buffer)
|
require("lazyvim.plugins.lsp.format").on_attach(client, buffer)
|
||||||
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
|
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
|
||||||
if client.server_capabilities.documentSymbolProvider then
|
|
||||||
require("nvim-navic").attach(client, buffer)
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- diagnostics
|
-- diagnostics
|
||||||
|
|
|
@ -287,6 +287,20 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- lsp symbol navigation for lualine
|
||||||
|
{
|
||||||
|
"SmiteshP/nvim-navic",
|
||||||
|
init = function()
|
||||||
|
vim.g.navic_silence = true
|
||||||
|
require("lazyvim.util").on_attach(function(client, buffer)
|
||||||
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
|
require("nvim-navic").attach(client, buffer)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
config = { separator = " ", highlight = true, depth_limit = 5 },
|
||||||
|
},
|
||||||
|
|
||||||
-- icons
|
-- icons
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue