mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 06:27:14 +01:00
29 lines
633 B
Lua
29 lines
633 B
Lua
return {
|
|
-- Autoformat
|
|
'stevearc/conform.nvim',
|
|
event = { 'BufWritePre', 'BufNewFile' },
|
|
lazy = false,
|
|
keys = {
|
|
{
|
|
'<leader>f',
|
|
function() require('conform').format { async = true, lsp_format = 'fallback' } end,
|
|
mode = '',
|
|
desc = '[F]ormat buffer',
|
|
},
|
|
},
|
|
opts = {
|
|
log_level = vim.log.levels.DEBUG,
|
|
notify_on_error = true,
|
|
format_on_save = {
|
|
timeout_ms = 500,
|
|
lsp_format = 'fallback',
|
|
},
|
|
formatters_by_ft = {
|
|
lua = { 'stylua' },
|
|
css = { 'stylelint' },
|
|
json = { 'eslint_d' },
|
|
['*'] = { 'codespell', 'trim_whitespace' },
|
|
},
|
|
},
|
|
}
|