refactor: rename compile/toggle commands to build/watch

Problem: `compile` and `toggle` are accurate but unintuitive — `compile`
sounds academic and `toggle` says nothing about what it toggles.

Solution: rename the public API and `:Preview` subcommands to `build`
(one-shot) and `watch` (live preview). Internal compiler functions are
unchanged. No aliases for old names — clean break.
This commit is contained in:
Barrett Ruth 2026-03-03 16:40:51 -05:00
parent 8c7bc61286
commit 3a36264f18
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 13 additions and 13 deletions

View file

@ -17,7 +17,7 @@ describe('commands', function()
it('does not error on :Preview with no provider', function()
require('preview.commands').setup()
assert.has_no.errors(function()
vim.cmd('Preview compile')
vim.cmd('Preview build')
end)
end)
@ -42,10 +42,10 @@ describe('commands', function()
end)
end)
it('does not error on :Preview toggle with no provider', function()
it('does not error on :Preview watch with no provider', function()
require('preview.commands').setup()
assert.has_no.errors(function()
vim.cmd('Preview toggle')
vim.cmd('Preview watch')
end)
end)
end)