Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Eglot #21

Open
Spidy104 opened this issue Nov 19, 2021 · 1 comment
Open

Eglot #21

Spidy104 opened this issue Nov 19, 2021 · 1 comment

Comments

@Spidy104
Copy link

Spidy104 commented Nov 19, 2021

I use clangd as my auto completion engine, how do we integrate it or is there not any support at all and how do we install and use new libraries?

@fernandodemorais-jf
Copy link

Hello @Spidy104,

The maintainers can be more specific, but I think PlatformIO supports only clang-tidy.

I use clangd with Eglot too, and I simply manually "convert" the .ccls file, auto-generated by compilation process, to a .clangd one.

A line like the following in a .ccls file:

%c -std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega328p

Would become, in the .clangd one:

---                             # Compiler arguments when parsing C files
If:
  PathMatch: .*\.c
CompileFlags:
  Add: [-std=gnu11, -fno-fat-lto-objects, -Os, -Wall, -ffunction-sections, -fdata-sections, -flto, -mmcu=atmega328p]

You can find more info about those parameters in https://clangd.llvm.org/config.

I believe that an "auto-converter" would be a great addition to the code, besides not seeming too complex to implement.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants