I'm trying to understand what feels like a bug in a LSP plugin in neovim because the same behavior isn't present in coc.nvim. How do I inspect rust-analyzer logs between coc.nvim and nvim-lspconfig?
Various kinds of features like going to the definition of a function, getting auto-completion results, or displaying documentation from an external crate or from the standard library do not work when I use nvim-lspconfig. All of these work with coc.nvim plus the rust-analyzer coc.nvim plugin, coc-rust-analyzer.
Good question! I think this would works best if the client (neovim) is tasked with capturing and displaying the LSP dialog. In VS Code, this is achieved by setting a "rust-analyzer.trace.server": "verbose" config value and opening a specific pane:
All that being said, logging lsp requests on the server side is possible by setting RA_LOG env var to lsp_server=debug. The log go to stderr by default. --log-file argument redirects the logs to file. Docs: