2 ms·
Language servers are supposed to mitigate that - they're supposed to be build aware and know all about include paths etc. For the C family this is usually done
by Asooka 7y ago
Language servers are supposed to mitigate that - they're supposed to be build aware and know all about include paths etc. For the C family this is usually done by having CMake write out a compile_commands.json file as part of its configure step, which is then picked up by the language server. Other languages should have their own methods. I still use build-unaware indexing, i.e. ctags, because it's simpler, faster and lets me look up things that aren't part of the current build configuration without having to switch builds.