From 48b466b23547b69fa72fc253e107d45c6b5e7642 Mon Sep 17 00:00:00 2001 From: Denbeigh Stevens Date: Sat, 20 Apr 2024 10:56:53 -0700 Subject: [PATCH] languages python: modernise config --- modules/languages/python.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/modules/languages/python.nix b/modules/languages/python.nix index f4184c5..424e036 100644 --- a/modules/languages/python.nix +++ b/modules/languages/python.nix @@ -1,4 +1,4 @@ -{ lib, ... }: +{ lib, pkgs, ... }: let inherit (lib) mkDefault; @@ -9,14 +9,20 @@ in lsp.servers.pylsp = { enable = mkDefault true; settings.plugins = { + autopep8.enabled = mkDefault false; black.enabled = mkDefault true; + flake8.enabled = mkDefault false; isort.enabled = mkDefault true; - ruff.enabled = mkDefault true; - pycodestyle.enabled = mkDefault true; - # pyflakes.enabled = mkDefault true; + pycodestyle.enabled = mkDefault false; + pyflakes.enabled = mkDefault false; pylsp_mypy = { enabled = mkDefault true; - dmypy = mkDefault true; + }; + ruff = { + enabled = mkDefault true; + executable = mkDefault "${pkgs.ruff}/bin/ruff"; + lineLength = mkDefault 88; + ignore = mkDefault [ "E501" ]; }; }; };