diff options
| author | David Kennedy <dave-kennedy@users.noreply.github.com> | 2022-08-01 04:12:20 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-01 12:12:20 +0200 |
| commit | 0188bc77b6fcfe4b292dedfe048cde9a6e00117c (patch) | |
| tree | b28518985b624c2639bf81e106efc14bf1937992 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-0188bc77b6fcfe4b292dedfe048cde9a6e00117c.tar nvim-lspconfig-0188bc77b6fcfe4b292dedfe048cde9a6e00117c.tar.gz nvim-lspconfig-0188bc77b6fcfe4b292dedfe048cde9a6e00117c.tar.bz2 nvim-lspconfig-0188bc77b6fcfe4b292dedfe048cde9a6e00117c.tar.lz nvim-lspconfig-0188bc77b6fcfe4b292dedfe048cde9a6e00117c.tar.xz nvim-lspconfig-0188bc77b6fcfe4b292dedfe048cde9a6e00117c.tar.zst nvim-lspconfig-0188bc77b6fcfe4b292dedfe048cde9a6e00117c.zip | |
fix(pylsp): elaborate configuration example (#2037)
See #1116, #1880, #1951, etc.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/pylsp.lua | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/lua/lspconfig/server_configurations/pylsp.lua b/lua/lspconfig/server_configurations/pylsp.lua index 7284fac4..2081d7b6 100644 --- a/lua/lspconfig/server_configurations/pylsp.lua +++ b/lua/lspconfig/server_configurations/pylsp.lua @@ -22,8 +22,25 @@ https://github.com/python-lsp/python-lsp-server A Python 3.6+ implementation of the Language Server Protocol. -The language server can be installed via `pipx install 'python-lsp-server[all]'`. -Further instructions can be found in the [project's README](https://github.com/python-lsp/python-lsp-server). +See the [project's README](https://github.com/python-lsp/python-lsp-server) for installation instructions. + +Configuration options are documented [here](https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md). +In order to configure an option, it must be translated to a nested Lua table and included in the `settings` aregument to the `setup{}` function. +For example, in order to set the `pylsp.plugins.pycodestyle.ignore` option: +```lua +require'lspconfig'.pylsp.setup{ + settings = { + pylsp = { + plugins = { + pycodestyle = { + ignore = {'W391'}, + maxLineLength = 100 + } + } + } + } +} +``` Note: This is a community fork of `pyls`. ]], |
