Skip to content
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

Clangd support: pass in compiler flags for header files #2

Closed
tomv564 opened this issue Aug 15, 2017 · 3 comments
Closed

Clangd support: pass in compiler flags for header files #2

tomv564 opened this issue Aug 15, 2017 · 3 comments

Comments

@tomv564
Copy link
Contributor

tomv564 commented Aug 15, 2017

Clangd supports a non-standard meta field on didOpen.

LSP would have to extract the extra flags using per-project configuration:
https://github.com/Valloric/ycmd#ycm_extra_confpy-specification

@tomv564
Copy link
Contributor Author

tomv564 commented Oct 20, 2017

Considering compdb as alternative: Sarcasm/irony-mode#323

@3v1n0
Copy link

3v1n0 commented Oct 26, 2017

I think it's a good workaround for now, however the way of using compdb has changed (and not really much documented :)). You've to do something like:

compdb -c compdb.complementers=headerdb -p . update # or pointing the dir for the compile_commands.json
compdb -c compdb.complementers=headerdb -p . list > compile_commands_full.json
mv compile_commands_full.json compile_commands.json

The first command will generate an headerdb.json file, the second will merge the two in one (you might also act on multiple directories at once, by providing multiple -p <path>'s)...

@tomv564
Copy link
Contributor Author

tomv564 commented Feb 11, 2018

Having tested cquery with a compilation database in #208 I'm convinced that the clangd extension on didOpen is not worth it. I hope we can improve the generation / maintenance of compilation DBs with header files with a clangd/cquery-specific LSP package.

@tomv564 tomv564 closed this as completed Feb 11, 2018
rchl added a commit that referenced this issue Jun 12, 2020
# This is the 1st commit message:

Add release scripts from GitGutter

# The commit message #2 will be skipped:
predragnikolic added a commit that referenced this issue Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants