dev: allow nvim-navic to attach to the Lsp if breadcrumbs is enabled

This commit is contained in:
raf 2023-07-19 23:06:06 +03:00
parent 41584157eb
commit 863047e490
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29

View file

@ -81,9 +81,16 @@ in {
end
end
${optionalString (config.vim.ui.breadcrumbs.enable) ''local navic = require("nvim-navic")''}
default_on_attach = function(client, bufnr)
attach_keymaps(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
local capabilities = vim.lsp.protocol.make_client_capabilities()