Skip to content

Commit ffec353

Browse files
fooyuhuiMayankm96
authored andcommitted
Adds IsaacLab extensions to VSCode settings (#526)
This MR adds the path of the isaac lab extensions to vscode `python.analysis.extraPaths` to execute intelligent prompt in vscode properly. Fixes #463 - Bug fix (non-breaking change which fixes an issue) In .vscode/tools/setup_vscode.py ![f9429980-bf0b-4e28-917b-10c0eccc92ce](https://github.com/isaac-sim/IsaacLab/assets/75050508/18cf4868-28be-4907-ae6e-be287ff946b1) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have run all the tests with `./isaaclab.sh --test` and they pass - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent 3fccc99 commit ffec353

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.vscode/tools/setup_vscode.py

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ def overwrite_python_analysis_extra_paths(isaaclab_settings: str) -> str:
6161
path_names = settings.split(",")
6262
path_names = [path_name.strip().strip('"') for path_name in path_names]
6363
path_names = ['"${workspaceFolder}/_isaac_sim/' + path_name + '"' for path_name in path_names if len(path_name) > 0]
64+
65+
# add the path names that are in the Isaac Lab extensions directory
66+
isaaclab_extensions = os.listdir(os.path.join(ISAACLAB_DIR, "source", "extensions"))
67+
path_names.extend(['"${workspaceFolder}/source/extensions/' + ext + '"' for ext in isaaclab_extensions])
68+
6469
# combine them into a single string
6570
path_names = ",\n\t\t".expandtabs(4).join(path_names)
6671

0 commit comments

Comments
 (0)