mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-01-11 12:40:19 +01:00
36 lines
913 B
Lua
36 lines
913 B
Lua
return {
|
|
-- lsp symbol navigation for lualine. This shows where
|
|
-- in the code structure you are - within functions, classes,
|
|
-- etc - in the statusline.
|
|
{
|
|
"SmiteshP/nvim-navic",
|
|
lazy = true,
|
|
init = function()
|
|
vim.g.navic_silence = true
|
|
end,
|
|
opts = function()
|
|
Snacks.util.lsp.on({ method = "textDocument/documentSymbol" }, function(buffer, client)
|
|
require("nvim-navic").attach(client, buffer)
|
|
end)
|
|
return {
|
|
separator = " ",
|
|
highlight = true,
|
|
depth_limit = 5,
|
|
icons = LazyVim.config.icons.kinds,
|
|
lazy_update_context = true,
|
|
}
|
|
end,
|
|
},
|
|
|
|
-- lualine integration
|
|
{
|
|
"nvim-lualine/lualine.nvim",
|
|
optional = true,
|
|
opts = function(_, opts)
|
|
if not vim.g.trouble_lualine then
|
|
table.insert(opts.sections.lualine_c, { "navic", color_correction = "dynamic" })
|
|
end
|
|
end,
|
|
},
|
|
}
|