Skip to content

Python (deprecated Palantir version)#

Server#

For more information about the LSP server, check pyls.

Installation#

pip install 'python-language-server[all]'

Debugger: Yes#

Available configurations#

lsp-clients-python-library-directories#

Type: (repeat string)

Default: (/usr/)

List of directories which will be considered to be libraries.


lsp-pyls-configuration-sources#

Type: (repeat string)

Default: [pycodestyle]

List of configuration sources to use.


lsp-pyls-disable-warning#

Type: boolean

Default: nil

Disable Palantir python-language-server deprecation warning


lsp-pyls-plugins-autopep8-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-flake8-config#

Type: string

Default: nil

A path to a config file that will be the only config file read and used. This will cause Flake8 to ignore all other config files that exist.

NOTE: other parameters as lsp-pyls-plugins-flake8-max-line-length take precedence over parameters referenced in config.


lsp-pyls-plugins-flake8-enabled#

Type: boolean

Default: nil

Enable or disable the plugin.


lsp-pyls-plugins-flake8-exclude#

Type: (repeat string)

Default: nil

List of glob patterns to exclude from checks.


lsp-pyls-plugins-flake8-filename#

Type: (repeat string)

Default: nil

List of glob patterns to include for checks.


lsp-pyls-plugins-flake8-hang-closing#

Type: boolean

Default: nil

Toggle whether pycodestyle should enforce matching the indentation of the opening bracket`s line. When you specify this, it will prefer that you hang the closing bracket rather than match the indentation.


lsp-pyls-plugins-flake8-ignore#

Type: (repeat string)

Default: nil

A list of codes to ignore.


lsp-pyls-plugins-flake8-max-line-length#

Type: integer

Default: nil

Set the maximum length that any line (with some exceptions) may be. Exceptions include lines that are either strings or comments which are entirely URLs.


lsp-pyls-plugins-flake8-select#

Type: (repeat string)

Default: nil

Specify the list of error codes you wish Flake8 to report. Similarly to lsp-pyls-plugins-flake8-ignore. You can specify a portion of an error code to get all that start with that string. For example, you can use E, E4, E43, and E431


lsp-pyls-plugins-jedi-completion-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-jedi-completion-fuzzy#

Type: boolean

Default: nil

If enabled, uses fuzzy completion in jedi. Requires pyls >= 0.32.0 Can hit performance, as well as lsp-mode implements its own fuzzy search on completion items.


lsp-pyls-plugins-jedi-completion-include-class-objects#

Type: boolean

Default: t

If enabled, adds class objects to completion in order to avoid snippet with init args.

Has no effect if lsp-pyls-plugins-jedi-completion-include-params is disabled. Requires pyls >= 0.33.0


lsp-pyls-plugins-jedi-completion-include-params#

Type: boolean

Default: t

Auto-completes methods and classes with tabstops for each parameter.


lsp-pyls-plugins-jedi-definition-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-jedi-definition-follow-builtin-imports#

Type: boolean

Default: t

If follow_imports is True will decide if it follow builtin imports.


lsp-pyls-plugins-jedi-definition-follow-imports#

Type: boolean

Default: t

The goto call will follow imports.


lsp-pyls-plugins-jedi-environment#

Type: string

Default: nil

Specify the environment that jedi runs on where /bin/python should be the python executable. This option will be prioritized over lsp-pyls-plugins-jedi-use-pyenv-environment.


lsp-pyls-plugins-jedi-hover-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-jedi-references-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-jedi-signature-help-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-jedi-symbols-all-scopes#

Type: boolean

Default: t

If True lists the names of all scopes instead of only the module namespace.


lsp-pyls-plugins-jedi-symbols-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-jedi-use-pyenv-environment#

Type: boolean

Default: nil

If enabled, pass the environment got by pyenv to jedi


lsp-pyls-plugins-mccabe-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-mccabe-threshold#

Type: number

Default: 15

The minimum threshold that triggers warnings about cyclomatic complexity.


lsp-pyls-plugins-preload-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-preload-modules#

Type: (repeat string)

Default: nil

List of modules to import on startup


lsp-pyls-plugins-pycodestyle-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-pycodestyle-exclude#

Type: (repeat string)

Default: nil

Exclude files or directories which match these patterns.


lsp-pyls-plugins-pycodestyle-filename#

Type: (repeat string)

Default: nil

When parsing directories, only check filenames matching these patterns.


lsp-pyls-plugins-pycodestyle-hang-closing#

Type: boolean

Default: nil

Hang closing bracket instead of matching indentation of opening bracket`s line.


lsp-pyls-plugins-pycodestyle-ignore#

Type: (repeat string)

Default: nil

Ignore errors and warnings


lsp-pyls-plugins-pycodestyle-max-line-length#

Type: number

Default: nil

Set maximum allowed line length.


lsp-pyls-plugins-pycodestyle-select#

Type: (repeat string)

Default: nil

Select errors and warnings


lsp-pyls-plugins-pydocstyle-add-ignore#

Type: (repeat string)

Default: nil

Ignore errors and warnings in addition to the specified convention.


lsp-pyls-plugins-pydocstyle-add-select#

Type: (repeat string)

Default: nil

Select errors and warnings in addition to the specified convention.


lsp-pyls-plugins-pydocstyle-convention#

Type: (choice (:tag pep257 numpy))

Default: nil

Choose the basic list of checked errors by specifying an existing convention.


lsp-pyls-plugins-pydocstyle-enabled#

Type: boolean

Default: nil

Enable or disable the plugin.


lsp-pyls-plugins-pydocstyle-ignore#

Type: (repeat string)

Default: nil

Ignore errors and warnings


lsp-pyls-plugins-pydocstyle-match#

Type: string

Default: (?!test_).*\.py

Check only files that exactly match the given regular expression; default is to match files that dont start withtest_but end with.py`.


lsp-pyls-plugins-pydocstyle-match-dir#

Type: string

Default: [^\.].*

Search only dirs that exactly match the given regular expression; default is to match dirs which do not begin with a dot.


lsp-pyls-plugins-pydocstyle-select#

Type: (repeat string)

Default: nil

Select errors and warnings


lsp-pyls-plugins-pyflakes-enabled#

Type: boolean

Default: t

Enable or disable the plugin.


lsp-pyls-plugins-pylint-args#

Type: lsp-string-vector

Default: []

Arguments, passed to pylint


lsp-pyls-plugins-pylint-enabled#

Type: boolean

Default: nil

Enable or disable the plugin.


lsp-pyls-plugins-rope-completion-enabled#

Type: boolean

Default: nil

Enable or disable the plugin.


lsp-pyls-plugins-yapf-enabled#

Type: boolean

Default: nil

Enable or disable the plugin.


lsp-pyls-rename-backend#

Type: (choice (const :tag jedi jedi) (const :tag rope rope))

Default: jedi

Choose renaming backend.

Jedi is preferred but only works for python >= 3.6 and pyls >= 0.32.0 Beware that Jedi is lazy and doesn`t scan the whole project. So it will rename only references it can find.


lsp-pyls-rope-extension-modules#

Type: string

Default: nil

Builtin and c-extension modules that are allowed to be imported and inspected by rope.


lsp-pyls-rope-rope-folder#

Type: (repeat string)

Default: nil

The name of the folder in which rope stores project configurations and data. Pass nil for not using such a folder at all.


lsp-pyls-server-command#

Type: (repeat string)

Default: (pyls)

Command to start pyls.



Last update: April 27, 2024