Hyprland-dotfiles/nvim/lua/modules/configs/completion/servers/pylsp.lua
2024-07-21 02:51:17 -04:00

47 lines
995 B
Lua

-- https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/pylsp.lua
return {
cmd = { "pylsp" },
filetypes = { "python" },
settings = {
pylsp = {
plugins = {
-- Lint
ruff = {
enabled = true,
select = {
-- enable pycodestyle
"E",
-- enable pyflakes
"F",
},
ignore = {
-- ignore E501 (line too long)
-- "E501",
-- ignore F401 (imported but unused)
-- "F401",
},
extendSelect = { "I" },
severities = {
-- Hint, Information, Warning, Error
F401 = "I",
E501 = "I",
},
},
flake8 = { enabled = false },
pyflakes = { enabled = false },
pycodestyle = { enabled = false },
mccabe = { enabled = false },
-- Code refactor
rope = { enabled = true },
-- Formatting
black = { enabled = true },
pyls_isort = { enabled = false },
autopep8 = { enabled = false },
yapf = { enabled = false },
},
},
},
}