summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/cfg/neoformat/init.lua
blob: eb9596e71082899d6219b25cc09327fc854033fe (plain)
1
2
3
4
5
6
7
8
9
10
11
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