nvim/lua/plugins/conform.lua
Oliver Hartmann 8966af7289 added conform
2025-04-04 13:36:50 +00:00

28 lines
546 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' },
},
},
keys = {
{
'<space>f',
mode = { 'n', 'x', 'v' },
function()
require('conform').format()
end,
desc = 'Format with Conform',
},
},
}