Commit ffec353e authored by Yuhui Fu's avatar Yuhui Fu Committed by Mayank Mittal

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
parent 3fccc994
...@@ -61,6 +61,11 @@ def overwrite_python_analysis_extra_paths(isaaclab_settings: str) -> str: ...@@ -61,6 +61,11 @@ def overwrite_python_analysis_extra_paths(isaaclab_settings: str) -> str:
path_names = settings.split(",") path_names = settings.split(",")
path_names = [path_name.strip().strip('"') for path_name in path_names] path_names = [path_name.strip().strip('"') for path_name in path_names]
path_names = ['"${workspaceFolder}/_isaac_sim/' + path_name + '"' for path_name in path_names if len(path_name) > 0] path_names = ['"${workspaceFolder}/_isaac_sim/' + path_name + '"' for path_name in path_names if len(path_name) > 0]
# add the path names that are in the Isaac Lab extensions directory
isaaclab_extensions = os.listdir(os.path.join(ISAACLAB_DIR, "source", "extensions"))
path_names.extend(['"${workspaceFolder}/source/extensions/' + ext + '"' for ext in isaaclab_extensions])
# combine them into a single string # combine them into a single string
path_names = ",\n\t\t".expandtabs(4).join(path_names) path_names = ",\n\t\t".expandtabs(4).join(path_names)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment