mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-23 21:09:48 +01:00
dev: allow nvim-navic to attach to the Lsp if breadcrumbs is enabled
This commit is contained in:
parent
41584157eb
commit
863047e490
1 changed files with 7 additions and 0 deletions
|
@ -81,9 +81,16 @@ in {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
${optionalString (config.vim.ui.breadcrumbs.enable) ''local navic = require("nvim-navic")''}
|
||||||
default_on_attach = function(client, bufnr)
|
default_on_attach = function(client, bufnr)
|
||||||
attach_keymaps(client, bufnr)
|
attach_keymaps(client, bufnr)
|
||||||
format_callback(client, bufnr)
|
format_callback(client, bufnr)
|
||||||
|
${optionalString (config.vim.ui.breadcrumbs.enable) ''
|
||||||
|
-- let navic attach to buffers
|
||||||
|
if client.server_capabilities.documentSymbolProvider then
|
||||||
|
navic.attach(client, bufnr)
|
||||||
|
end
|
||||||
|
''}
|
||||||
end
|
end
|
||||||
|
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
|
Loading…
Reference in a new issue