rgbkrk / python-lsp-zed-extension

Python LSP Server Zed Extension
28 stars 1 forks source link

Python LSP Server Zed Extension

This extension uses the Python Language Server to provide language support for Python in Zed. It has providers for jedi, mccabe, pycodestyle, pydocstyle, pyflakes, pylint, rope, yapf, mypy, and more.

Installation

Before installing this extension, install the Python Language Server and ensure that it is on your PATH. Example, using pipx:

pipx install "python-lsp-server[all]"

All extensions to the python-lsp-server must be installed to the same virtualenv that you install the server into.

Configuration

Use any of the configuration settings that pylsp supports within your zed config under pylsp.settings. Here's an example that disables the E501 line length warning:

"pylsp": {
  "settings": {
    "plugins": {
      "pycodestyle": {
        "enabled": true,
        "ignore": ["E501"]
      }
    }
  }
}