With LSP proper configured, you can have something like the following screenshot.
You can also use these stub files to make mypy work better with your plugins.
I personally use this with LSP + LSP-pyright setup.
-
Install the LSP package via Package Control.
-
You have to copy those
.pyi
stub files from this repository toYOUR_PROJECT_ROOT/typings/
directory. -
Make your preferred LSP server able to "see" them.
-
If you use LSP-pyright, configure the
python.analysis.extraPaths
:{ "settings": { "python.analysis.extraPaths": [ // project's stubs "$folder/typings", // my custom stubs "$packages/../typings", ], // a special predefined setup for developing ST plugins "pyright.dev_environment": "sublime_text", }, }
-
If you use LSP-pylsp, configure the
pylsp.plugins.jedi.extra_paths
:{ "settings": { "pylsp.plugins.jedi.extra_paths": [ // project's stubs "$folder/typings", // my custom stubs "$packages/../typings", ], }, }
-
-
Restart your ST and happy coding ♥
This repository is initially mostly based on AmjadHD/sublime_dev's work.
Apart from @AmjadHD's work, there are also some other similar works: