Skip to content

Commit

Permalink
Adds extensions to VSCode python.analysis.extraPaths settings (#526)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fuyh20 authored and Mayankm96 committed Jun 25, 2024
1 parent 3fccc99 commit 512710c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .vscode/tools/setup_vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def overwrite_python_analysis_extra_paths(isaaclab_settings: str) -> str:
path_names = settings.split(",")
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]

# 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
path_names = ",\n\t\t".expandtabs(4).join(path_names)

Expand Down

0 comments on commit 512710c

Please sign in to comment.