I want to add/expand the Clangd Language server, which I installed through Mason within Neovim, with the standard libraries that come with MinGW (I run windows 11). I'm trying to do CP, and for that I need <bits/stdc++.h> header file. The problem is, Clangd doesn't not recognize that header file and doesn't give me any intelli-sense & gives me warnings saying 'E447: Can't find file "std" in path', and things similar to it. I build the .cpp files using the command (keybinded) :!g++ Wall prac.cpp -o a.exe
and it has no problem with the header file (I think because the compiler of MinGW is used here). Std is not recognized Header file is not recognized
I went through several threads regarding this. I tried the following:
Tried to add an compile_commands.json file, but ended up not knowing where to add/save the file. (The bin of Mason in nvim-data 'C:\Users\Ankit\AppData\Local\nvim-data\mason\packages\clangd\clangd\bin' (\clangd\clangd is not typo) has only clangd.exe file in it) -- **couldn't figure how to tell clangd to find the header files from the MinGW folder.
I was thinking of adding the header files themselves to the place Clang searches for header files but realised that Clang comes from LLVM (didn't do it).
Please see the followings attachments for verbose.
This is for Clang but it comes from LLVM
I also have LLVM installed in my system. Hence, I want to add the header file in the LSP server if possible to remove the errors. (NOTE: The server works absolutely fine with headers like iostream, vector etc. I just want to add that header for CP only).
EDIT:: I want to know how I can add the compile_commands.json file for Clangd, which is installed through Mason in NVIM. I realise that this is more of a Mason and Clangd issue than it is an NVIM issue, but since Mason is a 'plugin' of Neovim, I believe that I can get some answers here.