Skip to content

Commit 115243d

Browse files
committed
python formatting
1 parent 3807d7d commit 115243d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

init.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,23 @@ require('lazy').setup({
331331
lua = { 'stylua' },
332332
-- Conform can also run multiple formatters sequentially
333333
-- python = { "isort", "black" },
334+
python = {
335+
'ruff_fix',
336+
'ruff_organize_imports',
337+
ruff_format = {
338+
args = function(_, _)
339+
return {
340+
'format',
341+
'--force-exclude',
342+
'--line-length',
343+
'120',
344+
'--stdin-filename',
345+
'$FILENAME',
346+
'-',
347+
}
348+
end,
349+
},
350+
},
334351
--
335352
-- You can use a sub-list to tell conform to run *until* a formatter
336353
-- is found.

0 commit comments

Comments
 (0)