nixos-configs/homeManagerModules/neovim/langs/python.nix

46 lines
1 KiB
Nix
Raw Normal View History

{
config,
lib,
2024-05-25 20:28:35 -04:00
pkgs,
...
}: let
inherit (lib) mkIf;
cfg = config.programs.neovim;
in
mkIf cfg.enableIde {
programs = {
neovim = {
withPython3 = true;
2024-11-26 23:36:33 -05:00
extraPython3Packages = py:
with py; ([
python-lsp-server
]
++ python-lsp-server.optional-dependencies.all);
extraPackages = with pkgs.python3Packages; ([
python-lsp-server
]
++ python-lsp-server.optional-dependencies.all);
2024-05-11 20:10:45 -04:00
extraLuaConfig =
2024-06-09 22:49:30 -04:00
# lua
2024-05-11 20:10:45 -04:00
''
2024-11-26 23:36:33 -05:00
require('lspconfig').pylsp.setup({
capabilities = require('cmp_nvim_lsp').default_capabilities(),
2024-11-26 23:36:33 -05:00
settings = {
pylsp = {
plugins = {
pycodestyle = {
maxLineLength = 100,
},
},
},
},
});
2024-05-11 20:10:45 -04:00
'';
};
};
}