Weird clangd LSP issue #2986
Closed
LukaszMoskala
started this conversation in
General
Replies: 2 comments
-
P.IO must really be borikng the clang compile if it can't find gcc native headers. We use I'd suggest dumping the commands pio is calling in that compiledb stage and verifying they're correct and didn't produce any errors or warnings. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Okay, by some miracle, I figured it out. Adding |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Thank you for maintaining this great platform.
I'm not sure if that's the right place for this issue, but this doesn't happen when using other platform (for example AVR). If that's not the right place, feel free to close this issue and direct me where should I open it.
I use neovim with lazyvim + clangd LSP.
Steps to reproduce:
Create a new project:
Create src/main.cpp with following content:
Build database:
Run clangd:
Complete output of clangd:
It reports no errors, as expected.
Now, replace
platformio.ini
with:And run again
Which returns:
I'm not exactly sure why this happens. I kind of feel like this may be related to
-iwithprefixbefore/...
in output which doesn't look right to me. Also, using COMPILATIONDB_INCLUDE_TOOLCHAIN=True, causes clangd to not be able to find other platform-related includes like#include <FreeRTOS.h>
while platformio itself still properly compiles the code. This seems related to platformio/platformio-core#5166.I have no idea what I'm doing wrong or even in which project the problem is (here or in platformiocore)
Could anyone guide me in the right direction?
Thank you for your time
Beta Was this translation helpful? Give feedback.
All reactions