29 lines
574 B
Lua
29 lines
574 B
Lua
return {
|
|
'stevearc/conform.nvim',
|
|
cmd = { 'ConformInfo' },
|
|
opts = {
|
|
default_format_opts = {
|
|
lsp_format = 'fallback',
|
|
},
|
|
log_level = vim.log.levels.ERROR,
|
|
formatters_by_ft = {
|
|
lua = { 'stylua' },
|
|
python = { 'ruff_format' },
|
|
yaml = { 'yamlfmt' },
|
|
cmake = { 'gersemi' },
|
|
markdown = { 'prettier' },
|
|
json = { 'fixjson' },
|
|
},
|
|
},
|
|
keys = {
|
|
{
|
|
'<space>f',
|
|
mode = { 'n', 'x', 'v' },
|
|
function()
|
|
require('conform').format()
|
|
end,
|
|
desc = 'Format with Conform',
|
|
},
|
|
},
|
|
}
|