-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .clangd file #92
Add .clangd file #92
Conversation
That seems like a good idea, however the file seems to only work for a single build directory: https://clangd.llvm.org/config#compilationdatabase The user presets by default already come with many possible build folder locations: https://github.com/friendlyanon/cmake-init/blob/master/cmake-init/templates/common/CMakeUserPresets.json#L17 What I think would work is if this file was also in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this file to cmake-init/templates/common
and add it to the .gitignore
file as well.
.clangd
Outdated
@@ -0,0 +1,2 @@ | |||
CompileFlags: | |||
CompilationDatabase: ./build/dev/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this can just say build/dev
then please make it so.
Ping |
Hey @friendlyanon, have been busy sorry ! Not sure what you mean exactly by adding it |
I haven't noticed! Then please do the other requested changes. |
I've added a default
.clangd
compilation database for people who might be usingclangd
directly as their LSP, for example fromvim
/neovim
. The defaultdev
profile will export the compile commands by default, so I think it makes sense to point the default CompilationDatabase to that directory as well.