vis-lint

vis plugin for linting code
git clone anongit@rnpnr.xyz:vis-lint.git
Log | Files | Refs | Feed | README | LICENSE

Commit: ae84a19c26af928a02abc67f891cd2634fc55459
Parent: c6b97354af58114dd83e7e3b55d131728cc2b595
Author: Randy Palamar
Date:   Thu, 13 Apr 2023 17:32:06 -0600

pipe file to linter

this way the file doesn't need to be written before linting

Diffstat:
Minit.lua | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/init.lua b/init.lua @@ -1,6 +1,6 @@ vis:command_register("lint", function() local linters = {} - linters["bash"] = "shellcheck" + linters["bash"] = "shellcheck -" local cmd = linters[vis.win.syntax] if cmd == nil then @@ -9,7 +9,8 @@ vis:command_register("lint", function() end local file = vis.win.file - local _, ostr, estr = vis:pipe(file, {start = 0, finish = 0}, cmd .. " " .. file.name) + local _, ostr, estr = vis:pipe(file, {start = 0, finish = file.size}, + cmd .. " " .. file.name) if estr then vis:message(estr) return false