move to nvim.conform

This commit is contained in:
Thomas Ruoff
2023-11-08 11:03:45 +01:00
parent 9de52b0c26
commit 73b45db99c
2 changed files with 24 additions and 65 deletions

View File

@@ -0,0 +1,24 @@
return {
'stevearc/conform.nvim',
opts = {
log_level = vim.log.levels.DEBUG,
format_on_save = {
lsp_fallback = true,
timeout_ms = 500,
},
notify_on_error = true,
formatters = {},
formatters_by_ft = {
lua = { 'stylua' },
javascript = { { 'eslint_d', 'prettierd', 'prettier' } },
javascriptreact = { { 'eslint_d', 'prettierd', 'prettier' } },
typescript = { { 'eslint_d', 'prettierd', 'prettier' } },
typescriptreact = { { 'eslint_d', 'prettierd', 'prettier' } },
markdown = { { 'prettierd', 'prettier' } },
css = { { 'stylelint' } },
json = { { 'eslint_d', 'prettierd', 'prettier' } },
['*'] = { 'codespell' },
['_'] = { 'trim_whitespace' },
},
},
}