diff --git a/vis/.config/vis/visrc.lua b/vis/.config/vis/visrc.lua index 4dbf09f..43a8504 100644 --- a/vis/.config/vis/visrc.lua +++ b/vis/.config/vis/visrc.lua @@ -348,4 +348,12 @@ end) vis.events.subscribe(vis.events.WIN_OPEN, function(win) vis:command('set relativenumber') -end) \ No newline at end of file +end) + +vis.events.subscribe(vis.events.FILE_SAVE_PRE, function(file, path) + if path:find('[.]go$') then + -- formatting is async, so when reformated you should write file again + vis:command('lspc-format') + end + return true +end)