0

For the code completion I want to use clangd. I think it is a "server" that provides code completion. Clangd doesn't find links to the libraries in my avr-gcc code.

There are some descriptions:

https://clangd.llvm.org/troubleshooting#cant-find-includes-within-your-project

But I dont understand what would be appropriate in my case...

Has it something to do with compile_commands.json? config.yaml, .clangd?

clangd

Thank you

1 Answers1

1

AVR header files are stored in /usr/include/avr (assuming Linux), which avr-gcc will use instead of the tradtional /usr/include. However clangd doesn't know that you're using avr-gcc and thus will assume the default path for header files. You can have this path recognized by clangd through a .clangd file or in a compile_commands.json/compile_flags.txt either by hand or via build system/a generator (bear, for example).