mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
languages/python: add formatter that combines ruff format
with ruff check --fix
This commit is contained in:
parent
d61de135ce
commit
3d57e036f7
2 changed files with 16 additions and 0 deletions
|
@ -492,3 +492,9 @@
|
|||
- Fix default [blink.cmp] sources "path" and "buffer" not working when
|
||||
`autocomplete.nvim-cmp.enable` was disabled and
|
||||
`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`.
|
||||
|
|
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue