Skip to content

Commit 5a8970a

Browse files
author
Cruz Monrreal
authored
Merge pull request #9649 from ngraziano/fix-vscode-export
Fix IntelliSense in VSCode export
2 parents 31be2a3 + e85bbdd commit 5a8970a

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

tools/export/vscode/__init__.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,37 @@ def generate(self):
5959
continue
6060

6161
if directory == ".":
62-
all_directories.append("${workspaceRoot}/*")
62+
all_directories.append("${workspaceFolder}/*")
6363
else:
64-
all_directories.append(directory.replace("./", "${workspaceRoot}/") + "/*")
64+
all_directories.append(directory.replace("./", "${workspaceFolder}/") + "/*")
6565

6666
cpp_props = {
6767
"configurations": [
6868
{
6969
"name": "Windows",
70-
"includePath": [x.replace("/", "\\") for x in all_directories],
70+
"forcedInclude": [
71+
"${workspaceFolder}/mbed_config.h"
72+
],
73+
"compilerPath": self.toolchain.cppc[0],
74+
"intelliSenseMode": "gcc-x64",
75+
"includePath": all_directories,
7176
"defines": [symbol for symbol in self.toolchain.get_symbols()]
7277
},
7378
{
7479
"name": "Mac",
80+
"forcedInclude": [
81+
"${workspaceFolder}/mbed_config.h"
82+
],
83+
"compilerPath": self.toolchain.cppc[0],
7584
"includePath": all_directories,
7685
"defines": [symbol for symbol in self.toolchain.get_symbols()]
7786
},
7887
{
7988
"name": "Linux",
89+
"forcedInclude": [
90+
"${workspaceFolder}/mbed_config.h"
91+
],
92+
"compilerPath": self.toolchain.cppc[0],
8093
"includePath": all_directories,
8194
"defines": [symbol for symbol in self.toolchain.get_symbols()]
8295
}

0 commit comments

Comments
 (0)