Closed akmalsoliev closed 1 year ago
If you're using lsp-zero as I am, then you would need to add the following code to either your init.lua
or after/plugin/navbuddy.lua
:
local lsp = require('lsp-zero')
local navbuddy = require("nvim-navbuddy")
lsp.preset().on_attach(
function(client, bufnr)
navbuddy.attach(client, bufnr)
end
)
lsp.setup()
Hello,
First of all thank you for the plugin, this is something I was looking for as it provides an excellent class and method file exploration.
I am struggling on attaching navbuddy to the LSP as whenever the file is
source
d or:lua require("nvim-navbuddy").open()
the following error is given:After some digging I came to realisation that this indicates that navbuddy is not attached to the LSP.
Attempts (no success):
navbuddy.lua
file with code provided inREADME.md
require("lspconfig").clangd.setup { on_attach = function(client, bufnr) navbuddy.attach(client, bufnr) end }
Neither of these changes had any effects, so I would like to ask for your guidance on what would be the way to attach navbuddy to LSP? @SmiteshP
Thanks