From 3bf0d20c63e54d5bc48d15f835a6cbf88e0a6f31 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 30 Apr 2025 00:33:56 +0300 Subject: [PATCH] editor/helix: config for python Signed-off-by: unexplrd --- modules/home/programs/editor/helix.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/home/programs/editor/helix.nix b/modules/home/programs/editor/helix.nix index 5013d78..c178ad6 100644 --- a/modules/home/programs/editor/helix.nix +++ b/modules/home/programs/editor/helix.nix @@ -66,6 +66,10 @@ in { markdown-oxide.command = getExe pkgs.markdown-oxide; # nil.command = getExe pkgs.nil; nixd.command = getExe pkgs.nixd; + pyright.command = getExe pkgs.pyright; + pyright.args = ["-"]; + ruff.command = getExe pkgs.ruff; + ruff.args = ["server"]; # rust-analyzer.command = getExe pkgs.rust-analyzer; # texlab.command = getExe pkgs.texlab; tinymist.command = getExe pkgs.tinymist; @@ -111,6 +115,20 @@ in { # language-servers = ["rust-analyzer"]; # formatter.command = getExe pkgs.rustfmt; # } + { + name = "python"; + auto-format = true; + language-servers = [ + { + name = "ruff"; + only-features = ["format" "diagnostics"]; + } + { + name = "pyright"; + except-features = ["format" "diagnostics"]; + } + ]; + } ]; }; };