1
0
Fork 0

Use formatting_seq_sync also on manual formatting

This commit is contained in:
Daniele Tricoli 2022-02-02 12:39:24 +01:00
parent c03a82277c
commit 8b75b6932b
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ null_ls.setup({
on_attach = function(client, bufnr)
-- Format on save.
if client.resolved_capabilities.document_formatting then
buf_set_keymap('n', '<A-f>', '<cmd>lua vim.lsp.buf.formatting_sync()<cr>', opts)
buf_set_keymap('n', '<A-f>', '<cmd>lua vim.lsp.buf.formatting_seq_sync()<cr>', opts)
vim.cmd 'autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()'
end
end