languages/python: add formatter that combines ruff format with ruff check --fix

This commit is contained in:
Valter Schütz 2025-08-10 13:48:37 +02:00
commit 3d57e036f7
2 changed files with 16 additions and 0 deletions

View file

@ -492,3 +492,9 @@
- Fix default [blink.cmp] sources "path" and "buffer" not working when - Fix default [blink.cmp] sources "path" and "buffer" not working when
`autocomplete.nvim-cmp.enable` was disabled and `autocomplete.nvim-cmp.enable` was disabled and
`autocomplete.nvim-cmp.sources` had not been modified. `autocomplete.nvim-cmp.sources` had not been modified.
[valterschutz](https://github.com/valterschutz):
[ruff]: (https://github.com/astral-sh/ruff)
- Add [ruff-fix] as a formatter option in `vim.languages.python.format.type`.

View file

@ -91,6 +91,16 @@
''; '';
}; };
}; };
ruff-fix = {
package = pkgs.writeShellApplication {
name = "ruff-fix";
runtimeInputs = [pkgs.ruff];
text = ''
ruff format - "$@" | ruff check --fix --exit-zero -
'';
};
};
}; };
defaultDebugger = "debugpy"; defaultDebugger = "debugpy";