parent
891ba58074
commit
025bb83e50
1 changed files with 30 additions and 5 deletions
|
@ -9,11 +9,18 @@
|
||||||
cfg = config.programs.neovim;
|
cfg = config.programs.neovim;
|
||||||
|
|
||||||
# We keep the packages here because python is a bit complicated and common
|
# We keep the packages here because python is a bit complicated and common
|
||||||
pythonPkgs = py:
|
pythonPkgs = p:
|
||||||
(attrValues {
|
(attrValues {
|
||||||
inherit (py) python-lsp-server;
|
inherit
|
||||||
|
(p)
|
||||||
|
python-lsp-server
|
||||||
|
pyls-isort
|
||||||
|
pylsp-mypy
|
||||||
|
python-lsp-ruff
|
||||||
|
python-lsp-jsonrpc
|
||||||
|
;
|
||||||
})
|
})
|
||||||
++ py.python-lsp-server.optional-dependencies.all;
|
++ p.python-lsp-server.optional-dependencies.all;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable && cfg.ideConfig.enablePython) {
|
config = mkIf (cfg.enable && cfg.ideConfig.enablePython) {
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -32,8 +39,26 @@ in {
|
||||||
settings = {
|
settings = {
|
||||||
pylsp = {
|
pylsp = {
|
||||||
plugins = {
|
plugins = {
|
||||||
pycodestyle = {
|
-- auto-completion options
|
||||||
maxLineLength = 100,
|
jedi_completion = {
|
||||||
|
fuzzy = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- import sorting
|
||||||
|
pyls_isort = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- type checker
|
||||||
|
pylsp_mypy = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- linter
|
||||||
|
ruff = {
|
||||||
|
enabled = true,
|
||||||
|
formatEnabled = true,
|
||||||
|
lineLength = 100,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue