Vscode-cpptools: can i customize the default includepath in .vscode?

Created on 28 May 2016  路  5Comments  路  Source: microsoft/vscode-cpptools

_From @whr94621 on May 27, 2016 2:2_

I am using ubuntu 16.04 and the default includePath of Linux is always '/usr/include'.
I have always to add '/usr/include/c++/5.x' to the path manually.
Is there any way to modify the default includePath?
thx!

_Copied from original issue: Microsoft/vscode#6951_

Feature Request Language Service

Most helpful comment

Hi, @sridmad, the ability of setting default include paths in global settings could be really useful. Sometimes I just want to edit a single .c file and not to create a workspace only for this purpose. I think headers like stdio.h, string.h, etc. should be available by default for every .c file even without a workspace (.vscode/c_cpp_properties.json).

All 5 comments

@whr94621 this issue should belong to the cpptools extension right?

_From @whr94621 on May 28, 2016 11:44_

@Tyriar I am not so sure about where to put this issue...

By default we specify /usr/include when we generate the config file. Language service will recursively iterate through the files under the set of given paths and add them to the database. You can definitely remove the default path and specify specific paths. We are also looking into allowing finer grained control of the folders we parse

Run the C/CPP: Edit Configurations command to bring up your configurations file. In there you'll see the includePath property which is a comma-separated list of directories to search. You can specify a recursive search of all subdirectories, or use a '_' at the end to only look at files in the specified directory. For example:
/usr/include/c++/5.x - will search that directory and all subdirectories
/usr/include/c++/5.x/_ - will only pick up files in that directory

Hi, @sridmad, the ability of setting default include paths in global settings could be really useful. Sometimes I just want to edit a single .c file and not to create a workspace only for this purpose. I think headers like stdio.h, string.h, etc. should be available by default for every .c file even without a workspace (.vscode/c_cpp_properties.json).

Was this page helpful?
0 / 5 - 0 ratings