Closed ElAv252 closed 1 month ago
The C diagnostics are provided by clangd, which is a 3rd party tool. If you use compiler flags that are not defaults for your version of clangd (such as a new language version - Apple is somewhat notorious for shipping an outdated version of the LLVM toolchain!), you may have to tell clangd what flags to build with. Or if your project uses something like cmake/meson/premake to generate build files, those tools can be instructed to generate a compile_commands.json
with all the necessary flags on a per-source-file basis.
I used gcc compiler...
And i show the erros in the "Problem diagnostic" panel of zed.
What compiler you use for actually building your code is irrelevant. You need to tell the language server what flags to build with so that the language server can do its thing correctly.
Ok, got it. Thanks!
Check for existing issues
Describe the bug / provide steps to reproduce it
I have an issue that the "Problem diagnostic" show me that I have some errors in the code, but actually I don't.
I would love for you to look into the matter, thank you very much!!
Environment
Model Name: MacBook Pro Chip: Apple M1 Pro Memory: 16 GB
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log