From 409dfed3237f9f0a6e96879078d1daf3d9c02e03 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 7 Jul 2021 14:10:25 +0200 Subject: Updated config again after Chris's updates --- .config/nvim/lua/cfg/neoformat/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .config/nvim/lua/cfg/neoformat/init.lua (limited to '.config/nvim/lua/cfg/neoformat') diff --git a/.config/nvim/lua/cfg/neoformat/init.lua b/.config/nvim/lua/cfg/neoformat/init.lua new file mode 100644 index 0000000..eb9596e --- /dev/null +++ b/.config/nvim/lua/cfg/neoformat/init.lua @@ -0,0 +1,12 @@ +-- autoformat +if O.format_on_save then + require("cfg.utils").define_augroups { + autoformat = { + { + "BufWritePre", + "*", + [[try | undojoin | Neoformat | catch /^Vim\%((\a\+)\)\=:E790/ | finally | silent Neoformat | endtry]], + }, + }, + } +end -- cgit v1.2.3-70-g09d2