~havi/nvim.d

b33aabbb4e5de13093227eafb8d062bc9803081e — havi 5 months ago 37b42c2
feat(after/ftplugin/rust): autoformat before save
1 files changed, 4 insertions(+), 0 deletions(-)

M after/ftplugin/rust.lua
M after/ftplugin/rust.lua => after/ftplugin/rust.lua +4 -0
@@ 184,3 184,7 @@ wk.register({
   buffer = vim.api.nvim_get_current_buf(),
   noremap = true,
})
-- auto format before saving
vim.api.nvim_exec([[ autocmd BufWritePre *.rs :silent! lua vim.lsp.buf.format({async = true}) ]], false)
-- -- show/refresh diagnostics after saving
-- vim.api.nvim_exec([[ autocmd BufWritePost *.rs :silent! lua vim.diagnostic.setloclist() ]], false)
\ No newline at end of file