Fix autoformat
This commit is contained in:
parent
a4db3b52f7
commit
4e5ed5d043
24
init.lua
24
init.lua
|
@ -600,17 +600,17 @@ require('lazy').setup({
|
||||||
|
|
||||||
{ -- Autoformat
|
{ -- Autoformat
|
||||||
'stevearc/conform.nvim',
|
'stevearc/conform.nvim',
|
||||||
lazy = false,
|
lazy = true,
|
||||||
keys = {
|
-- keys = {
|
||||||
{
|
-- {
|
||||||
'<leader>f',
|
-- '<leader>f',
|
||||||
function()
|
-- function()
|
||||||
require('conform').format { async = true, lsp_fallback = true }
|
-- require('conform').format { async = true, lsp_fallback = true }
|
||||||
end,
|
-- end,
|
||||||
mode = '',
|
-- mode = '',
|
||||||
desc = '[F]ormat buffer',
|
-- desc = '[F]ormat buffer',
|
||||||
},
|
-- },
|
||||||
},
|
-- },
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
notify_on_error = false,
|
||||||
format_on_save = function(bufnr)
|
format_on_save = function(bufnr)
|
||||||
|
@ -878,7 +878,7 @@ require('lazy').setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
require('conform').formatters.golines = {
|
require('conform').formatters.golines = {
|
||||||
prepend_args = { '-w -m 128 --no-reformat-tags' },
|
prepend_args = { '--max-len=128' },
|
||||||
}
|
}
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|
Loading…
Reference in New Issue