panicinc / icarus

Swift, C, C++, and Objective-C Support for Nova
MIT License
70 stars 5 forks source link

custom clangd configuration? #19

Closed gknops closed 3 months ago

gknops commented 3 months ago

I am using the plug-in for ESP-IDF development and for the most part it works well.

The only issue is that apparently the ESP-IDF toolchain uses some commands not known to clangd:

Unknown argument '-mlongcalls'; did you mean '-mlong-calls'?
Unknown argument: '-fno-shrink-wrap'
Unknown argument: '-fno-tree-switch-conversion'
Unknown argument: '-fstrict-volatile-bitfields'

And of course those show up for every source file.

So I wonder if I could add an ideally project-specific clangd configuration like so:

CompileFlags:
  Add: -Wno-unknown-warning-option 
  Remove: [-m*, -f*]
gknops commented 3 months ago

Turns out .clangd in any parent directory of the source file in question will work.

Sorry for the noise!

gknops commented 3 months ago

Thanks for this nice plugin!

logancollins commented 2 months ago

Turns out .clangd in any parent directory of the source file in question will work.

Sorry for the noise!

No worries! I did not know this, that's good info, and glad you got it working.