diff --git a/hm/dev/python.nix b/hm/dev/python.nix index 4d9ec18..5ddf404 100644 --- a/hm/dev/python.nix +++ b/hm/dev/python.nix @@ -27,7 +27,7 @@ lint = { select = [ "ALL" ]; ignore = [ - # Things that don't teach me to write better Python + # Things only relevant in proper applications, but not scripts "CPY" # Copyright "D1" # missing docstring "ERA" # commented out code @@ -48,24 +48,17 @@ }; }; }; - nixvim.plugins.lsp.servers.pylsp = { - # Python - enable = config.frogeye.dev.python; - settings.plugins = { - ruff.enabled = true; - pylsp_mypy = { - enabled = true; - overrides = [ - "--cache-dir=${config.xdg.cacheHome}/mypy" - "--ignore-missing-imports" - "--disallow-untyped-defs" - "--disallow-untyped-calls" - "--disallow-incomplete-defs" - "--disallow-untyped-decorators" - true - ]; + nixvim.plugins.lsp.servers = lib.mkIf config.frogeye.dev.python { + ruff.enable = true; + basedpyright = { + enable = true; + settings.basedpyright = { + analysis = { + ignore = [ "*" ]; # Handled by ruff + typeCheckingMode = "standard"; # Should not be an hassle for scripting with untyped libraries + }; + disableOrganizeImports = true; # Handled by ruff }; - # TODO Could add some, could also remove some }; }; };