Replies: 3 comments 6 replies
-
I'm not too familiar with docker setups and
are coming from the server (the client is just making the server's logs available for viewing). So, the message seems to indicate that the path |
Beta Was this translation helpful? Give feedback.
-
I understand the error message, but the point is that such a path exists in the docker but it doesn’t exist in my host. That is why I used the mapping. :) |
Beta Was this translation helpful? Give feedback.
-
I finally managed to make it work. You can use a |
Beta Was this translation helpful? Give feedback.
-
Dear all,
I am running clangd on a docker and my lsp client is able to connect to it! I am so glad of that! :D
However, the setup is not yet fully functioning, although I am able to jump to some definition. I followed the tips herein provided and I have the source code folder both on the host mounted on the docker container.
The project root is mapped as it follows:
on the host:
/home/yt75534/avap_example
on the docker:
/app
That is, I have the src on both the host and the docker. I have the build in the docker along with a
compile_commands.json
.Then, on the docker I also have a
/host_home
folder which is my home folder on the host.I run the clangd server through a .sh file that ends up with the following command:
docker run .... clangd --path-mappings=/home/yt75534/avap_example=/app,/home/yt75534=/host_home,/home/yt75534/docker_include/c++/9:/usr/include/c++/9 --log=verbose
So far, so (almost) good.
In-fact, by observing the error messages reported by my LSP client (which is this ) I have the following error(s):
which to me it is obvious because
/app/build/gcc9_linux_x86_64-machine
does not exists in the host. I think the folder to set CWD should be/home/yt75534/avap_example/build/gcc9_linux_x86_64-machine
and not/app/build/gcc9_linux_x86_64-machine
as reported by the error message due to the--path-mappings
passed to theclangd
invocation, right?What I am doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions