ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

LSP-basedpyright

by sublimelsp ST4

Python support for Sublime's LSP plugin provided through DetachHead/basedpyright.

Details

Installs

  • Total 1K
  • Win 406
  • Mac 304
  • Linux 431
Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23
Windows 2 3 0 1 1 1 0 1 0 0 1 0 2 1 1 1 1 1 1 5 2 3 0 1 0 1 1 0 0 2 2 0 0 3 0 1 1 2 2 4 2 1 1 0 0 0
Mac 0 1 0 1 0 0 0 0 0 0 3 2 2 1 4 1 0 2 1 0 1 0 0 1 3 3 3 0 2 1 1 1 4 2 1 2 2 0 0 3 0 1 0 1 0 0
Linux 1 2 2 1 0 2 2 2 4 0 0 0 0 4 1 7 4 1 1 3 1 0 0 2 3 1 3 3 0 1 3 0 3 0 1 2 0 1 1 3 3 1 0 1 0 3
0246810Jun 7Jun 4Jun 1May 29May 26May 23May 20May 17May 14May 11May 8May 5May 2Apr 29Apr 26Apr 23Jun 7 Linux: 1 Mac: 0 Windows: 2Jun 6 Linux: 2 Mac: 1 Windows: 3Jun 5 Linux: 2 Mac: 0 Windows: 0Jun 4 Linux: 1 Mac: 1 Windows: 1Jun 3 Linux: 0 Mac: 0 Windows: 1Jun 2 Linux: 2 Mac: 0 Windows: 1Jun 1 Linux: 2 Mac: 0 Windows: 0May 31 Linux: 2 Mac: 0 Windows: 1May 30 Linux: 4 Mac: 0 Windows: 0May 29 Linux: 0 Mac: 0 Windows: 0May 28 Linux: 0 Mac: 3 Windows: 1May 27 Linux: 0 Mac: 2 Windows: 0May 26 Linux: 0 Mac: 2 Windows: 2May 25 Linux: 4 Mac: 1 Windows: 1May 24 Linux: 1 Mac: 4 Windows: 1May 23 Linux: 7 Mac: 1 Windows: 1May 22 Linux: 4 Mac: 0 Windows: 1May 21 Linux: 1 Mac: 2 Windows: 1May 20 Linux: 1 Mac: 1 Windows: 1May 19 Linux: 3 Mac: 0 Windows: 5May 18 Linux: 1 Mac: 1 Windows: 2May 17 Linux: 0 Mac: 0 Windows: 3May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 2 Mac: 1 Windows: 1May 14 Linux: 3 Mac: 3 Windows: 0May 13 Linux: 1 Mac: 3 Windows: 1May 12 Linux: 3 Mac: 3 Windows: 1May 11 Linux: 3 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 2 Windows: 0May 9 Linux: 1 Mac: 1 Windows: 2May 8 Linux: 3 Mac: 1 Windows: 2May 7 Linux: 0 Mac: 1 Windows: 0May 6 Linux: 3 Mac: 4 Windows: 0May 5 Linux: 0 Mac: 2 Windows: 3May 4 Linux: 1 Mac: 1 Windows: 0May 3 Linux: 2 Mac: 2 Windows: 1May 2 Linux: 0 Mac: 2 Windows: 1May 1 Linux: 1 Mac: 0 Windows: 2Apr 30 Linux: 1 Mac: 0 Windows: 2Apr 29 Linux: 3 Mac: 3 Windows: 4Apr 28 Linux: 3 Mac: 0 Windows: 2Apr 27 Linux: 1 Mac: 1 Windows: 1Apr 26 Linux: 0 Mac: 0 Windows: 1Apr 25 Linux: 1 Mac: 1 Windows: 0Apr 24 Linux: 0 Mac: 0 Windows: 0Apr 23 Linux: 3 Mac: 0 Windows: 0Jun 7 Linux: 1 Mac: 0 Windows: 2Jun 6 Linux: 2 Mac: 1 Windows: 3Jun 5 Linux: 2 Mac: 0 Windows: 0Jun 4 Linux: 1 Mac: 1 Windows: 1Jun 3 Linux: 0 Mac: 0 Windows: 1Jun 2 Linux: 2 Mac: 0 Windows: 1Jun 1 Linux: 2 Mac: 0 Windows: 0May 31 Linux: 2 Mac: 0 Windows: 1May 30 Linux: 4 Mac: 0 Windows: 0May 29 Linux: 0 Mac: 0 Windows: 0May 28 Linux: 0 Mac: 3 Windows: 1May 27 Linux: 0 Mac: 2 Windows: 0May 26 Linux: 0 Mac: 2 Windows: 2May 25 Linux: 4 Mac: 1 Windows: 1May 24 Linux: 1 Mac: 4 Windows: 1May 23 Linux: 7 Mac: 1 Windows: 1May 22 Linux: 4 Mac: 0 Windows: 1May 21 Linux: 1 Mac: 2 Windows: 1May 20 Linux: 1 Mac: 1 Windows: 1May 19 Linux: 3 Mac: 0 Windows: 5May 18 Linux: 1 Mac: 1 Windows: 2May 17 Linux: 0 Mac: 0 Windows: 3May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 2 Mac: 1 Windows: 1May 14 Linux: 3 Mac: 3 Windows: 0May 13 Linux: 1 Mac: 3 Windows: 1May 12 Linux: 3 Mac: 3 Windows: 1May 11 Linux: 3 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 2 Windows: 0May 9 Linux: 1 Mac: 1 Windows: 2May 8 Linux: 3 Mac: 1 Windows: 2May 7 Linux: 0 Mac: 1 Windows: 0May 6 Linux: 3 Mac: 4 Windows: 0May 5 Linux: 0 Mac: 2 Windows: 3May 4 Linux: 1 Mac: 1 Windows: 0May 3 Linux: 2 Mac: 2 Windows: 1May 2 Linux: 0 Mac: 2 Windows: 1May 1 Linux: 1 Mac: 0 Windows: 2Apr 30 Linux: 1 Mac: 0 Windows: 2Apr 29 Linux: 3 Mac: 3 Windows: 4Apr 28 Linux: 3 Mac: 0 Windows: 2Apr 27 Linux: 1 Mac: 1 Windows: 1Apr 26 Linux: 0 Mac: 0 Windows: 1Apr 25 Linux: 1 Mac: 1 Windows: 0Apr 24 Linux: 0 Mac: 0 Windows: 0Apr 23 Linux: 3 Mac: 0 Windows: 0Jun 7 Linux: 1 Mac: 0 Windows: 2Jun 6 Linux: 2 Mac: 1 Windows: 3Jun 5 Linux: 2 Mac: 0 Windows: 0Jun 4 Linux: 1 Mac: 1 Windows: 1Jun 3 Linux: 0 Mac: 0 Windows: 1Jun 2 Linux: 2 Mac: 0 Windows: 1Jun 1 Linux: 2 Mac: 0 Windows: 0May 31 Linux: 2 Mac: 0 Windows: 1May 30 Linux: 4 Mac: 0 Windows: 0May 29 Linux: 0 Mac: 0 Windows: 0May 28 Linux: 0 Mac: 3 Windows: 1May 27 Linux: 0 Mac: 2 Windows: 0May 26 Linux: 0 Mac: 2 Windows: 2May 25 Linux: 4 Mac: 1 Windows: 1May 24 Linux: 1 Mac: 4 Windows: 1May 23 Linux: 7 Mac: 1 Windows: 1May 22 Linux: 4 Mac: 0 Windows: 1May 21 Linux: 1 Mac: 2 Windows: 1May 20 Linux: 1 Mac: 1 Windows: 1May 19 Linux: 3 Mac: 0 Windows: 5May 18 Linux: 1 Mac: 1 Windows: 2May 17 Linux: 0 Mac: 0 Windows: 3May 16 Linux: 0 Mac: 0 Windows: 0May 15 Linux: 2 Mac: 1 Windows: 1May 14 Linux: 3 Mac: 3 Windows: 0May 13 Linux: 1 Mac: 3 Windows: 1May 12 Linux: 3 Mac: 3 Windows: 1May 11 Linux: 3 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 2 Windows: 0May 9 Linux: 1 Mac: 1 Windows: 2May 8 Linux: 3 Mac: 1 Windows: 2May 7 Linux: 0 Mac: 1 Windows: 0May 6 Linux: 3 Mac: 4 Windows: 0May 5 Linux: 0 Mac: 2 Windows: 3May 4 Linux: 1 Mac: 1 Windows: 0May 3 Linux: 2 Mac: 2 Windows: 1May 2 Linux: 0 Mac: 2 Windows: 1May 1 Linux: 1 Mac: 0 Windows: 2Apr 30 Linux: 1 Mac: 0 Windows: 2Apr 29 Linux: 3 Mac: 3 Windows: 4Apr 28 Linux: 3 Mac: 0 Windows: 2Apr 27 Linux: 1 Mac: 1 Windows: 1Apr 26 Linux: 0 Mac: 0 Windows: 1Apr 25 Linux: 1 Mac: 1 Windows: 0Apr 24 Linux: 0 Mac: 0 Windows: 0Apr 23 Linux: 3 Mac: 0 Windows: 0

Readme

Source
raw.​githubusercontent.​com

LSP-basedpyright

Python support for Sublime's LSP plugin provided through DetachHead/basedpyright, which basically includes all Pyright features and some exclusive Pylance features such as semantic highlighting and inlay hints.

Installation

  1. Install LSP and LSP-basedpyright via Package Control.
  2. (Optional but recommended) Install the LSP-file-watcher-chokidar via Package Control to enable functionality to notify the server about new files.
  3. Restart Sublime.
  4. (Optional) Configure basedpyright for your virtualenv.

The Node.js is required by this server. If node is not in your $PATH, this package will suggest to install a local Node.js runtime automatically. If you instead decide to use node that is already installed on your system, make sure that it's at least a version 14.

Configuration

TIP: It's recommended to additionally install the LSP-json package which provides validation and auto-complete for LSP-basedpyright settings and the pyrightconfig.json configuration file.

Here are some ways to configure the package and the language server.

  • From Preferences > Package Settings > LSP > Servers > LSP-basedpyright
  • From the command palette Preferences: LSP-basedpyright Settings
  • Project-specific configuration From the command palette run Project: Edit Project and add your settings in:
{
     "settings": {
        "LSP": {
           "LSP-basedpyright": {
              "settings": {
                 // Put your settings here
              }
           }
        }
     }
  }
  • Various options can only be configured through a pyrightconfig.json configuration file (check configuration for more info)

Provided Command Palette commands

Command Description
LSP-basedpyright: Create Basedpyright Configuration File Creates a pyrightconfig.json file in the root of the project with basic options. Opens the configuration file if it already exists.

Virtual environments

The plugin attempts to resolve the virtual environment automatically from well-known environment variables and workspace files. This behavior can be disabled by explicitly setting the python interpreter in the python.pythonPath setting.

If you want to overwrite the virtual environment, the pyrightconfig.json file must be present at the root of your project.

This configuration file, at a minimum, should define where your Python virtualenvs are located, as well as the name of the one to use for your project:

{
    "venvPath": "/path/to/virtualenvs/",
    "venv": "myenv"
}

For example, if you have created a virtual environment inside the directory .venv within the project directory then you would use:

{
    "venvPath": ".",
    "venv": ".venv"
}

Note that the venv option is only supported in the pyrightconfig.json file. The venvPath option can also be specified in your .sublime-project, in case you don't want to hard-code a system-specific path in a shared project.