#VS Code + Arduino ext. with ClangD

1 messages · Page 1 of 1 (latest)

flat hazel
#

VS Code + Arduino ext. with ClangD

dull plover
#

Quote:
https://clangd.llvm.org/
"clangd understands your C++ code and adds smart features to your editor: code completion, compile errors, go-to-definition and more."

#

Aren't all those feature already there with the Arduino extension? I don't think you need clangd at all.

#

It looks to me like:
Arduino is using gcc normally (gcc is another compiler, "competitor" to clang).
So the cli arguments / options are for gcc. And clang doesn't understand them.
Basically like going to McDonald's and ordering a whopper.

flat hazel
flat hazel
#

not to mention the fact that at least the ESP boards compile with xtensa-lx106-elf-g++ apparently...

dull plover
#

I never used the vscode "Arduino" extension. A friend told me not to use it and use "platformio" instead 😄

#

It has full intellisense, completion, go to definion, etc

#

Platformio does have a bit of a learning curve. No nice menus to configure stuff like in the Arduino IDE, instead an ini file. But still I bet easier than trying to get clang working in an environment built around gcc.

flat hazel
#

hmm sounds good but I'm a real big vsc fan... I'll look into it...

#

platformIO has a vsc integration though, will check out that!

dull plover
flat hazel