diff options
author | Jacek Kiedrowski <[email protected]> | 2021-07-05 23:26:25 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-05 23:26:25 +0100 |
commit | 5b497747448b3946675f7361c9667bb0dc1da11a (patch) | |
tree | f9f08a2729f7f3134675114ac97e128a8be08ee7 /init.lua | |
parent | 64e544b56114f7b93a56814067caa28c83cfaec4 (diff) | |
parent | a469c710bfc01f291df68dba40464caaa2b496da (diff) |
Merge branch 'ChristianChiarulli:master' into master
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -12,3 +12,16 @@ require "lsp" if O.lang.emmet.active then require "lsp.emmet-ls" end + +-- autoformat +if O.format_on_save then + require("lv-utils").define_augroups { + autoformat = { + { + "BufWritePre", + "*", + [[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]], + }, + }, + } +end |