From a7a20653a069be3a1229a94368bc09fec7d66602 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 26 Nov 2024 23:36:33 -0500 Subject: [PATCH] feat(nvim): switch to pylsp --- homeManagerModules/neovim/langs/python.nix | 24 ++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/homeManagerModules/neovim/langs/python.nix b/homeManagerModules/neovim/langs/python.nix index fd493a8f..4484d282 100644 --- a/homeManagerModules/neovim/langs/python.nix +++ b/homeManagerModules/neovim/langs/python.nix @@ -13,15 +13,31 @@ in neovim = { withPython3 = true; - extraPackages = [ - pkgs.basedpyright - ]; + 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); extraLuaConfig = # lua '' - require('lspconfig').basedpyright.setup({ + require('lspconfig').pylsp.setup({ capabilities = require('cmp_nvim_lsp').default_capabilities(), + settings = { + pylsp = { + plugins = { + pycodestyle = { + maxLineLength = 100, + }, + }, + }, + }, }); ''; };