Open Moggel12 opened 2 years ago
Same problem here, running clang 13.0.1 with nvim 0.6.1 on Gentoo; this issue started recently.
Same problem here, running clang 13.0.1 with nvim 0.6.1 on Gentoo; this issue started recently.
Did you also install via a package manager? Or did you compile directly from the git repo?
I tried both, sadly it does not make a difference. Also I tried downgrading to clang 13.0.0, this did not help either.
After recompiling ccls manually from the repository, everything works fine. So at least for Gentoo it seems to be a packaging issue.
Seconding that, I had to rebuild ccls from source on Arch Linux. Version 13.0.1.
@Moggel12 did you have a look in the ccls-log and check what it thinks the workspace folder: ...
was?
depending on your language client, it may choose the workspace directory on a number of factors (special files, settings, ...) you may need to set this appropriately.
AFAIK for coc: rootPatterns
https://github.com/neoclide/coc.nvim/issues/341#issuecomment-455264153
(I use languageclient-neovim, there it's let g:LanguageClient_rootMarkers = ['.ccls-root', '.languageclient-root']
)
@MaskRay i've struggling with the workspace directory location myself, as it is not mentions in the documentation for the .ccls
file. It would be a time saver, if you included some hint about this in the wiki?
.ccls file is read from the
workspace directory
. This is set by the language client in your IDE!
coc.vim:rootPatterns
LanguageClient-neovim:g:LanguageClient_rootMarkers
...
Observed behavior
In my C++ project structure I have an
inc
directory as well as asrc
directory. Whenever I (insrc/*.cpp
) try to include files that reside in theinc
directory I get a "file not found error" from ccls.My .ccls file is setup very basic for now:
Further, using C++17 extensions will also give warnings, even though cpp files should be parsed with
-std=c++17
.Im sorry if this is not a bug, but I have not found any documentation stating why the setup above should not work.
Expected behavior
My custom headers,
inc/*.hpp
, should be included.Steps to reproduce
Create a C++ project with a
src
andinc
folder. Put a header file in theinc
directory and a cpp file in thesrc
directory. Then use the .ccls file mentioned earlier.System information
git describe --tags --long
): 0.20210330-5 (installed via pacman)