lsp linting clangd throws a linting error when doing an include e.g #include <iostream> error bits/c++config.h file not found
I already installed mingw(via choco install) and added it to my path
also tried added the includes
enter image description here
same with LLVM!
but when I tried to build a hello world program using cmake it works
as expected.
I also copied the compile_command.json to my root generated by cmake
I been spending 2 days to solve this, but still no luck
here's the linting problem. (lsp clangd windows)
any help is greatly appreciated.
the include errors occur because of wrong lsp clangd config
Finally. ah. sigh.. I fixed it. I'm doing things wrong from the start. there's no need to add flags to include everything e.g -I that has been missing. There's nothing wrong on the clangd itself. The problem lies on your lsp config.
I'm using windows,powershell, no wsl, nvim -> lunarvim and cmake the fix is simple you just need to add the compile command path on your --query-driver on your clang lsp config
after that everything should work nice and smooth