feat(nvim): add new extra: ruff formatting

This commit is contained in:
Sergio Laín 2024-03-12 14:16:35 +01:00
parent df1c358af6
commit c031f97874
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View 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,
},
}