diff --git a/vis/.config/vis/visrc.lua b/vis/.config/vis/visrc.lua index 7dfd2e0..4b83d3a 100644 --- a/vis/.config/vis/visrc.lua +++ b/vis/.config/vis/visrc.lua @@ -315,4 +315,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)