Closed tfachmann closed 2 years ago
I answered this myself.
As rust-tools spawns the LSP for you, make sure to add modifications of on_attach
to the setup of rust-tools.
E.g.
local function on_attach(client, bufnr)
require("nvim-navic").attach(client, bufnr)
end
require("rust-tools").setup({
server = {
on_attach = on_attach,
}
})
nvim-navic is a simple statusline/winbar component that uses LSP to show the current node context. It uses lsp's document_symbol which is provided by rust-analyzer.
Without rust-tools, nvim-navic works as expected.
When using rust-tools in combination with nvim-navic, it is unavailable where the following reports
false
:Is there a mechanism of rust-tools that could explain this behavior?