From 115243d39565bed7b5b47f12fbec41d17a913840 Mon Sep 17 00:00:00 2001 From: peturparkur Date: Sat, 2 Aug 2025 11:24:28 +0200 Subject: [PATCH] python formatting --- init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/init.lua b/init.lua index 227c077c..65f5ab78 100644 --- a/init.lua +++ b/init.lua @@ -331,6 +331,23 @@ require('lazy').setup({ lua = { 'stylua' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, + python = { + 'ruff_fix', + 'ruff_organize_imports', + ruff_format = { + args = function(_, _) + return { + 'format', + '--force-exclude', + '--line-length', + '120', + '--stdin-filename', + '$FILENAME', + '-', + } + end, + }, + }, -- -- You can use a sub-list to tell conform to run *until* a formatter -- is found.