minor the lspformat should be hook to BufWritePre

This commit is contained in:
ray-x 2024-03-19 16:27:26 +11:00
parent c597965d0f
commit c11ae3feed

View File

@ -276,7 +276,7 @@ local function set_mapping(lsp_attach_info)
end
if fmt then
api.nvim_create_autocmd({ 'BufWritePost' }, {
api.nvim_create_autocmd({ 'BufWritePre' }, {
group = gn,
desc = 'auto format',
buffer = bufnr,