Generate "compile_commands.json" for LSP ready IDEs
See original GitHub issueThe following command generates the requires files for LSP for plugins like coc-nvim:
pio project init --board my_board --ide vim --project-option "framework=arduino"
Problem is, after mutating the platformio.ini
and adding libraries, the .ccls
file is not kept updated.
How to make it so that all these auxiliary helper files get updated when project dependencies change? I was able to do it with
init
ing again.
Aside from that, I don’t think the .ccls
file should be dependent on project libs alone. Maybe the source does not use a library, so its deps should not be handled by ccls.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Configuring Emacs as a C/C++ IDE - LSP Mode
In order to generate compile_commands.json for Emacs itself I have found that Bear works fine. sudo apt-get install bear.
Read more >Lsp-mode when I can't generate compile_commands.json
The C codebase I'm working on has a very complex build system and it can only build it in windows :(. Everyone on...
Read more >Generating compilation database from GN - Google Groups
I think we could implement this via --json-ide-script, i.e. have a Python script that consumes the --ide=json output and transforms it into compile_commands....
Read more >emacs-lsp/lsp-mode - Gitter
Now when I run helm-lsp-diagnostics I get a lot of compiler errors, including one saying something like '-fconcept is unknown'. I could discard...
Read more >559674 – Improve parser for compile_commands.json - Bugs
Next step would be to take your existing code and integrate it into CDT. I suggest creating a gerrit* for review and legal...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, it makes sense to generate
compile_commands.json
in the root of project.See updated docs https://docs.platformio.org/en/latest/integration/compile_commands.html
Key changes:
Please confirm that it works now upgrading to the latest development version of PIO Core using
pio upgrade --dev
. Thanks!