Browse Source

Fixed the auto-format on save

master
Julio Biason 2 years ago
parent
commit
acf9dabea3
  1. 2
      nvim/after/plugin/lsp.lua

2
nvim/after/plugin/lsp.lua

@ -18,7 +18,7 @@ local attachment = function(client, bufnr)
if client.resolved_capabilities.document_formatting then
vim.api.nvim_command [[augroup Format]]
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]]
end
end

Loading…
Cancel
Save