mesonbuild / vscode-meson

Meson for VisualStudio Code
Apache License 2.0
99 stars 49 forks source link

intellisence syntax hightlight is broken, while pch are used. #238

Closed JKot-Coder closed 3 weeks ago

JKot-Coder commented 1 month ago

Everything included from pch are ignored by intellisence, leading to massive indentifier is undefined errors. This is because compile_commands.json contains an “include-pch” argument to add a compiled obj file, which are ok for are actuall compiling but completely ignored by intellisence. Since i'm using clang as compiler, and intellisence for code highlight. The correct way is to use the “include” argument and add the pch source code, insted precompiled obj.

I have verified that adding the “include” of the pch source code to compile_commands.json solves the problem.

I assume that clangd suffers from the same problem. But didn't check it.

tristan957 commented 3 weeks ago

Please move this to the meson repo with a reproducer and more readable description.