#VS Code + Arduino ext. with ClangD
1 messages · Page 1 of 1 (latest)
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.
not at all - the Arduino extension roughly marks errors but doesn't tell you what the error actually is (disregarding a really short info quip).
sometimes the code completion is adequate, sometimes utterly useless and wrong. There's no support for refactoring and all those creature comforts known from other "languages"
thank you for the hint! I'll try looking into that
not to mention the fact that at least the ESP boards compile with xtensa-lx106-elf-g++ apparently...
have not been getting any wiser on how to get it to work - rather found some information why it doesn't (yet) but the post is already a little older...
https://esp32.com/viewtopic.php?t=29563
Espressif ESP32 Official Forum
Oh wow
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.
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!
yes exactly. Platformio on VS-code is what I'm using as well
and debugging works on that aswell? (at least for the supported boards)