Sublime Forum

Goto Definition of third-party packages


Is there a way to use Goto Definition on installed third-party packages? e.g. I’d like to jump from forms.ValidationError(...) in my source code to .../site-packages/django/core/

Sublime Text 4 (4143)
The project use Python, Django and virtualenv.



For the built-in goto-definition to work it needs to index all related code - ie. have them open in the side-bar and not ignored by settings.



Thanks, Benjamin.

The virtual environment for the project is stored (locally) within the git repo, but is ignored from git by adding the folder to the .gitignore file. I’ve tried to use index_include_patterns setting in Sublime’s Project settings file, but it looks like I also need to set index_exclude_gitignore: false for this to work. However, setting that to false ultimately means everything is indexed and therefore makes the index_include_patterns redundant.

Is there a way to use index_include_patterns, or similar, without disabling index_exclude_gitignore for files/folders that are in gitignore?



lsp and lsp-pyright will do if you welcome plugins.

1 Like


Not currently no. index_exclude_gitignore takes precedent over the patterns.

1 Like