From 0188bc77b6fcfe4b292dedfe048cde9a6e00117c Mon Sep 17 00:00:00 2001 From: David Kennedy Date: Mon, 1 Aug 2022 04:12:20 -0600 Subject: fix(pylsp): elaborate configuration example (#2037) See #1116, #1880, #1951, etc. --- lua/lspconfig/server_configurations/pylsp.lua | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'lua') 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`. ]], -- cgit v1.2.3-70-g09d2