Replies: 4 comments 8 replies
-
I went ahead and converted this into a Q&A Discussion - I'm not entirely sure myself if / how this can be set up, but maybe someone on thea team or community knows. |
Beta Was this translation helpful? Give feedback.
-
I'm using When building the cmake project, adding a Also, the llvm-clangd guide page gives some decent instructions on how to setup clangd. For example, use a But maybe I didn't answer your question as of how to set a specific path to a |
Beta Was this translation helpful? Give feedback.
-
I am also searching for clangd configuration documentation. I've placed a .clangd configuration file in the root of my project that specifies include paths (this is also root of the open Zed 'project'); but it appears that the .clangd file is not being used by the language server. ••Update 1•• After some trial and error, the following .clangd in the root of my project worked for my situation, which is simpler than the original topic of this thread, but maybe it helps someone...
••Update 2•• So now I've found a real need for the "lsp" property in settings.json...
I was hoping this would disable clangd's header insertion, but unfortunately it does not. Does anyone know if documentation exists for configuring the LSP? |
Beta Was this translation helpful? Give feedback.
-
That suggestion worked. I removed the hard coded path from clangd file.
Thank you!
Em qui., 19 de dez. de 2024 07:57, Alex Murkoff ***@***.***>
escreveu:
… @alexlnkp <https://github.com/alexlnkp> do you know any workaround for
relative paths? I read that: clangd/clangd#1038
<clangd/clangd#1038> but I didn't see anything
promising to give a try.
You can add a compile_flags.txt file with following contents into the
root of your project (alongside .clangd)
-I
include/
This way, the include directory is looked into when clangd is working, so
headers in the include directory are seen.
Although that would mean that you don't really need .clangd file then,
since all of the arguments can be specified there instead (one argument per
line).
I wish .clangd would support relative includes, but I doubt that will ever
happen.
—
Reply to this email directly, view it on GitHub
<#6629 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2J57XV6AEDIVYRZAF4LA32GKRBLAVCNFSM6AAAAABLP5LLCGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCNRRGYYDGNA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I want to give a try to this editor. I am building a project with
xmake
. The build system generates acompile_commands.json
in a folder in the root project called.xmake
.I want to configure the LSP server for C++ to set a specific path to the binary and pass the command that points to this file.
Beta Was this translation helpful? Give feedback.
All reactions