Closed JacekHoleczek closed 2 years ago
This isn't a support channel. nvim-lspconfig is a set of configs. Send PRs if you find an issue.
Sorry for using the wrong channel.
I now created: https://github.com/neovim/neovim/issues/18412
Following the discussions in the above-given thread, it seems that this is just another emanation of the known clang problems "when opening headers outside of my project directory".
The only solution is to enforce "--compile-commands-dir=/tmp/trial/src
" when the clangd
executable is called.
The given directory must be the "absolute path" to where the project's "compile_flags.txt
" (or "compile_commands.json
") resides.
Unfortunately, I do not see any foreseen option for it in the chain NVIM
-> its-builtin-LSP -> nvim-lspconfig
-> clangd
server call.
Description
I am having problems in NVIM with "#include" files that are "not found".
Please find below a minimal "reproducer".
While editing the "
main.cxx
" file, when one executes "gd" or "gD" (i.e. "vim.lsp.buf.definition" or "vim.lsp.buf.declaration") for the included"XY/X.hxx"
file, it will open this file but then it immediately reports an error:'XY/Y.hxx' file not found
Neovim version
NVIM v0.6.1 Build type: Release LuaJIT 2.1.0-beta3 Compiled by runner@fv-az87-780
Nvim-lspconfig version
No response
Operating system and version
Linux x86_64
Affected language servers
clangd 14.0.0
Steps to reproduce
See the minimal "reproducer" in the "Description" above.
Actual behavior
clangd based lsp cannot find "nested" include files
Expected behavior
No response
Minimal config
LSP log
https://gist.github.com/JacekHoleczek/55a6e58d47b538b22abf028c7292a7d1