✨ feat(nvim): add new extra: ruff formatting
This commit is contained in:
parent
df1c358af6
commit
c031f97874
1 changed files with 18 additions and 0 deletions
18
.config/nvim/lua/plugins/extras/formatting/ruff.lua
Normal file
18
.config/nvim/lua/plugins/extras/formatting/ruff.lua
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.formatters_by_ft.python = opts.formatters_by_ft.python or {}
|
||||||
|
table.insert(opts.formatters_by_ft.python, "ruff_format")
|
||||||
|
table.insert(opts.formatters_by_ft.python, "ruff_fix")
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
vim.list_extend(opts.ensure_installed, { "ruff" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue