Merge pull request #9649 from ngraziano/fix-vscode-export

Fix IntelliSense in VSCode export
pull/9745/head
Cruz Monrreal 2019-02-15 12:28:00 -06:00 committed by GitHub
commit 5a8970a48b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 3 deletions

View File

@ -59,24 +59,37 @@ class VSCode(Makefile):
continue
if directory == ".":
all_directories.append("${workspaceRoot}/*")
all_directories.append("${workspaceFolder}/*")
else:
all_directories.append(directory.replace("./", "${workspaceRoot}/") + "/*")
all_directories.append(directory.replace("./", "${workspaceFolder}/") + "/*")
cpp_props = {
"configurations": [
{
"name": "Windows",
"includePath": [x.replace("/", "\\") for x in all_directories],
"forcedInclude": [
"${workspaceFolder}/mbed_config.h"
],
"compilerPath": self.toolchain.cppc[0],
"intelliSenseMode": "gcc-x64",
"includePath": all_directories,
"defines": [symbol for symbol in self.toolchain.get_symbols()]
},
{
"name": "Mac",
"forcedInclude": [
"${workspaceFolder}/mbed_config.h"
],
"compilerPath": self.toolchain.cppc[0],
"includePath": all_directories,
"defines": [symbol for symbol in self.toolchain.get_symbols()]
},
{
"name": "Linux",
"forcedInclude": [
"${workspaceFolder}/mbed_config.h"
],
"compilerPath": self.toolchain.cppc[0],
"includePath": all_directories,
"defines": [symbol for symbol in self.toolchain.get_symbols()]
}