Python LSP setup

This commit is contained in:
Filippo Berto 2023-03-03 13:49:01 +01:00
parent 329671fb4e
commit 971b5c1c8d
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056

View file

@ -1,9 +1,20 @@
{ pkgs, lib, config, ... }: {
home.packages = [ pkgs.black pkgs.python3 ]
++ lib.optionals config.programs.helix.enable builtins.attrValues {
inherit (pkgs.python3Packages) python-lsp-server pyls-flake8 pyls-isort;
} ++ lib.optionals config.programs.kakoune.enable builtins.attrValues {
inherit (pkgs.python3Packages) python-lsp-server pyls-flake8 pyls-isort;
};
{ pkgs, lib, config, ... }:
let
py = pkgs.python3;
pyPkgs = py.pkgs;
in
{
home.packages = [ py pyPkgs.black ]
++ lib.optionals config.programs.helix.enable ([
pyPkgs.python-lsp-server
pyPkgs.pyls-flake8
pyPkgs.pyls-isort
] ++ pyPkgs.python-lsp-server.optional-dependencies.all)
++ lib.optionals config.programs.kakoune.enable ([
pyPkgs.python-lsp-server
pyPkgs.pyls-flake8
pyPkgs.pyls-isort
] ++ pyPkgs.python-lsp-server.optional-dependencies.all);
programs.neovim.withPython3 = true;
}