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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user