48 lines
1,023 B
Nix
48 lines
1,023 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
inherit (lib) attrValues mkIf;
|
|
|
|
cfg = config.programs.neovim;
|
|
|
|
pythonPkgs = py:
|
|
(attrValues {
|
|
inherit (py) python-lsp-server;
|
|
})
|
|
++ py.python-lsp-server.optional-dependencies.all;
|
|
in {
|
|
config = mkIf cfg.enable {
|
|
programs = {
|
|
neovim = {
|
|
withPython3 = true;
|
|
|
|
extraPython3Packages = pythonPkgs;
|
|
extraPackages = pythonPkgs pkgs.python3Packages;
|
|
|
|
extraLuaConfig =
|
|
# lua
|
|
''
|
|
require('lspconfig').pylsp.setup({
|
|
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
|
|
|
settings = {
|
|
pylsp = {
|
|
plugins = {
|
|
pycodestyle = {
|
|
maxLineLength = 100,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
|
|
# For accurate stack trace
|
|
_file = ./default.nix;
|
|
}
|