|
|
@ -18,7 +18,7 @@ local attachment = function(client, bufnr) |
|
|
|
if client.resolved_capabilities.document_formatting then |
|
|
|
if client.resolved_capabilities.document_formatting then |
|
|
|
vim.api.nvim_command [[augroup Format]] |
|
|
|
vim.api.nvim_command [[augroup Format]] |
|
|
|
vim.api.nvim_command [[autocmd! * <buffer>]] |
|
|
|
vim.api.nvim_command [[autocmd! * <buffer>]] |
|
|
|
vim.api.nvim_command [[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_seq_sync()]] |
|
|
|
vim.api.nvim_command [[autocmd BufWritePre <buffer> lua vim.lsp.buf.format({async = false})]] |
|
|
|
vim.api.nvim_command [[augroup END]] |
|
|
|
vim.api.nvim_command [[augroup END]] |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|