added conform
This commit is contained in:
27
lua/plugins/conform.lua
Normal file
27
lua/plugins/conform.lua
Normal file
@ -0,0 +1,27 @@
|
||||
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',
|
||||
},
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user