mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-02 05:14:30 +02:00
plugins/nvim-lsp: fix pylsp error when no plugins set (#253)
This commit is contained in:
parent
5a69dc4712
commit
720d55e999
1 changed files with 27 additions and 25 deletions
|
@ -412,34 +412,36 @@ in {
|
||||||
extraPackages = with cfg.settings; let
|
extraPackages = with cfg.settings; let
|
||||||
isNotNullAndEnabled = x: (!isNull x) && x.enabled;
|
isNotNullAndEnabled = x: (!isNull x) && x.enabled;
|
||||||
in
|
in
|
||||||
lists.flatten (map
|
optionals (!isNull cfg.settings.plugins) (
|
||||||
(
|
lists.flatten (map
|
||||||
pluginName: (
|
(
|
||||||
optionals (isNotNullAndEnabled plugins.${pluginName})
|
pluginName: (
|
||||||
cfg.package.optional-dependencies.${pluginName}
|
optionals (isNotNullAndEnabled plugins.${pluginName})
|
||||||
|
cfg.package.optional-dependencies.${pluginName}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
[
|
||||||
|
"autopep8"
|
||||||
|
"flake8"
|
||||||
|
"mccabe"
|
||||||
|
"pycodestyle"
|
||||||
|
"pydocstyle"
|
||||||
|
"pyflakes"
|
||||||
|
"pylint"
|
||||||
|
"yapf"
|
||||||
|
])
|
||||||
|
++ (
|
||||||
|
optionals
|
||||||
|
(
|
||||||
|
(isNotNullAndEnabled plugins.rope_autoimport)
|
||||||
|
|| (isNotNullAndEnabled plugins.rope_completion)
|
||||||
|
)
|
||||||
|
cfg.package.optional-dependencies.rope
|
||||||
)
|
)
|
||||||
[
|
++ (
|
||||||
"autopep8"
|
optional (isNotNullAndEnabled plugins.pylsp_mypy)
|
||||||
"flake8"
|
pkgs.python3Packages.pylsp-mypy
|
||||||
"mccabe"
|
|
||||||
"pycodestyle"
|
|
||||||
"pydocstyle"
|
|
||||||
"pyflakes"
|
|
||||||
"pylint"
|
|
||||||
"yapf"
|
|
||||||
])
|
|
||||||
++ (
|
|
||||||
optionals
|
|
||||||
(
|
|
||||||
(isNotNullAndEnabled plugins.rope_autoimport)
|
|
||||||
|| (isNotNullAndEnabled plugins.rope_completion)
|
|
||||||
)
|
)
|
||||||
cfg.package.optional-dependencies.rope
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
optional (isNotNullAndEnabled plugins.pylsp_mypy)
|
|
||||||
pkgs.python3Packages.pylsp-mypy
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue