2023-10-11 22:36:45 +02:00
|
|
|
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
|
2024-03-22 09:15:09 +01:00
|
|
|
LazyVim.lsp.on_attach(function(client, buffer)
|
2023-10-11 22:36:45 +02:00
|
|
|
if client.supports_method("textDocument/documentSymbol") then
|
|
|
|
require("nvim-navic").attach(client, buffer)
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
end,
|
|
|
|
opts = function()
|
|
|
|
return {
|
|
|
|
separator = " ",
|
|
|
|
highlight = true,
|
|
|
|
depth_limit = 5,
|
2024-06-16 15:35:38 +02:00
|
|
|
icons = LazyVim.config.icons.kinds,
|
2023-10-11 22:36:45 +02:00
|
|
|
lazy_update_context = true,
|
|
|
|
}
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- lualine integration
|
|
|
|
{
|
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
optional = true,
|
|
|
|
opts = function(_, opts)
|
2024-06-07 13:12:05 +03:00
|
|
|
if not vim.g.trouble_lualine then
|
2024-11-08 05:08:43 -08:00
|
|
|
table.insert(opts.sections.lualine_c, { "navic", color_correction = "dynamic" })
|
2024-06-07 13:12:05 +03:00
|
|
|
end
|
2023-10-11 22:36:45 +02:00
|
|
|
end,
|
|
|
|
},
|
|
|
|
}
|