Solving the problem of clangd not finding system headers of MSVC
Clangd
is a language server that can work with many editors via a plugin, such as the clangd
plugin in VSCode. Generally, the plugin is used in couple with cmake
or other tools which can generate a compile-commands.json
file. It is a very good plugin, maybe better than the Microsoft's C/C++
plugin. However, there are still some annoying issues, especially on Windows. One of them is that clangd can't find the system headers, such as iostream
, fstream
. To solve this, one way is to manually specify the include directories of system headers in the clangd configure file.