mirror of
https://github.com/tomru/vim.git
synced 2026-03-04 06:57:19 +01:00
move to nvim.conform
This commit is contained in:
24
lua/custom/plugins/formatter.lua
Normal file
24
lua/custom/plugins/formatter.lua
Normal 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' },
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user