feat: implement public API and plugin commands

Rewrite init.lua to expose setup(), run(), stop(), and toggle() that
coordinate across config, runner, window, and indicator modules. Replace
the placeholder SayHello command in plugin/watchexec.lua with keymaps
(<Leader>wx{t,s,r}), :WatchexecRun/:WatchexecStop/:WatchexecToggle
commands, VimLeavePre cleanup, and VimResized auto-resize.
This commit is contained in:
Stevan Freeborn
2026-07-06 19:51:37 -05:00
parent 398d3dd585
commit 1c46c3fcd9
5 changed files with 417 additions and 22 deletions
+7 -2
View File
@@ -2,8 +2,11 @@ local health = require("watchexec.health")
local stub = require("luassert.stub")
describe("watchexec healthcheck", function()
local start_stub, ok_stub, error_stub
local has_stub, exec_stub
local start_stub
local ok_stub
local error_stub
local has_stub
local exec_stub
before_each(function()
start_stub = stub(vim.health, "start")
@@ -29,6 +32,7 @@ describe("watchexec healthcheck", function()
has_stub = stub(vim.fn, "has", function()
return 1
end)
exec_stub = stub(vim.fn, "executable", function()
return 1
end)
@@ -44,6 +48,7 @@ describe("watchexec healthcheck", function()
has_stub = stub(vim.fn, "has", function()
return 1
end)
exec_stub = stub(vim.fn, "executable", function()
return 0
end)