diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-13 23:24:34 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2022-01-13 23:24:34 +0100 |
commit | c54d55bd47db65892c34851d2d3e08630efa00ff (patch) | |
tree | a901941e14b14295cd0776a430d47b16050ccce6 /lua | |
parent | e0417687471c9de0dfb20c50093ad61a040be8e6 (diff) |
Add formatting on save
Diffstat (limited to 'lua')
-rw-r--r-- | lua/config/autocommands.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/config/autocommands.lua b/lua/config/autocommands.lua index 213801a..a6038d2 100644 --- a/lua/config/autocommands.lua +++ b/lua/config/autocommands.lua @@ -26,4 +26,9 @@ vim.cmd([[ autocmd! autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2 augroup end + Autoformat + augroup _lsp + autocmd! + autocmd BufWritePre * lua vim.lsp.buf.formatting() + augroup end ]]) |