diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-08-15 13:25:05 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-08-15 13:25:05 +0200 |
commit | b3a25c858a5cf55c954e9d78acd75a135992778d (patch) | |
tree | 5110f03eb46a2728c89e8d537ec358165cc70f66 /config/essentials/vis/vis-lua.lua | |
parent | 4185a9b7ef76d686af011c8f66c14150add04426 (diff) | |
parent | b6484958979b0bb6398dc95b72f233bea20fe1b4 (diff) |
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'config/essentials/vis/vis-lua.lua')
-rw-r--r-- | config/essentials/vis/vis-lua.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config/essentials/vis/vis-lua.lua b/config/essentials/vis/vis-lua.lua new file mode 100644 index 0000000..83a831a --- /dev/null +++ b/config/essentials/vis/vis-lua.lua @@ -0,0 +1,12 @@ +vis:command_register("check", function(_, _, win) + local fd = vis:communicate("check", "luacheck --no-color " .. win.file.path) + if not fd then + vis:info("error") + end + vis.events.subscribe(vis.events.PROCESS_RESPONSE, function(name, _, _, msg) + if name ~= "check" then + return + end + vis:message(msg) + end) +end, "Check for errors in the file") |