From 563c73a409e1e6126abd38e1e80eb6613f272965 Mon Sep 17 00:00:00 2001 From: jasmine Date: Sun, 23 Mar 2025 01:09:09 +0800 Subject: [PATCH] feat: conform python --- config/plugins/lsp/conform.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/config/plugins/lsp/conform.nix b/config/plugins/lsp/conform.nix index 892ef38..14c8c94 100644 --- a/config/plugins/lsp/conform.nix +++ b/config/plugins/lsp/conform.nix @@ -9,9 +9,19 @@ settings = { # Map of filetype to formatters. formatters_by_ft = { - c = ["clang-format"]; - lua = ["stylua"]; - nix = ["alejandra"]; + c = [ + "clang-format" + ]; + lua = [ + "stylua" + ]; + nix = [ + "alejandra" + ]; + python = [ + "isort" + "black" + ]; }; # Install our formatters @@ -25,6 +35,12 @@ stylua = { command = lib.getExe pkgs.stylua; }; + isort = { + command = lib.getExe pkgs.isort; + }; + black = { + command = lib.getExe pkgs.black; + }; }; # Receive notificaton when a formatter errors.