Tell VSCode IntelliSense to prefer local header file over one in /usr/local/include?

Viewed 28

I'm working on a C codebase that I suppose you could call a monorepo. Folder A contains code for various libraries which are used by code in Folder B. When I look at a B file in VSCode and try to jump to the definition of a symbol defined in an A header, VSCode takes me to the A header that's been installed in /usr/local/include by a make rule, instead of the local copy of the header in Folder A.

Is there some way to tell VSCode to prefer the local Folder A version of the header over the /usr/local/include header that it's getting by talking to the compiler about system include paths? I'm not finding anything in the docs for c_cpp_properties.json that seems to be able to do this. I'm just a bit concerned that an intern is going to start merrily editing headers in /usr/local/include instead of editing them in Folder A and doing a make install.

0 Answers
Related