From 4034b6b6731bcd9e575c2faea46b350c73965cd9 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 22 Jul 2023 14:48:51 +0200 Subject: [PATCH] feat: update pylsp conf 1. support using black as formatter 2. replace obsolete pyls-isort with maintained ones --- lua/config/lsp.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 4851921..be4fd33 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -104,12 +104,21 @@ if utils.executable("pylsp") then settings = { pylsp = { plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options pylint = { enabled = true, executable = "pylint" }, + ruff = { enabled = false }, pyflakes = { enabled = false }, pycodestyle = { enabled = false }, + -- type checker + pylsp_mypy = { enabled = true, report_progress = true, live_mode = false }, + -- auto-completion options jedi_completion = { fuzzy = true }, - pyls_isort = { enabled = true }, - pylsp_mypy = { enabled = true }, + -- import sorting + isort = { enabled = true }, }, }, },