From 1d0077ab600122c3a10bd0807bf7c33f5a29c1d4 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 4 Mar 2026 13:11:14 -0500 Subject: [PATCH] refactor(commands): remove stop subcommand Problem: :Preview stop had a subtle distinction from toggle-off (kill process but keep autocmd) that nobody reaches for deliberately from the command line. Solution: remove stop from the command dispatch table. The Lua API require('preview').stop() remains as a programmatic escape hatch. --- lua/preview/commands.lua | 3 --- spec/commands_spec.lua | 7 ------- 2 files changed, 10 deletions(-) diff --git a/lua/preview/commands.lua b/lua/preview/commands.lua index 14199ab..a2e0470 100644 --- a/lua/preview/commands.lua +++ b/lua/preview/commands.lua @@ -4,9 +4,6 @@ local handlers = { compile = function() require('preview').compile() end, - stop = function() - require('preview').stop() - end, clean = function() require('preview').clean() end, diff --git a/spec/commands_spec.lua b/spec/commands_spec.lua index 9b63f87..5cca5a2 100644 --- a/spec/commands_spec.lua +++ b/spec/commands_spec.lua @@ -21,13 +21,6 @@ describe('commands', function() end) end) - it('does not error on :Preview stop', function() - require('preview.commands').setup() - assert.has_no.errors(function() - vim.cmd('Preview stop') - end) - end) - it('does not error on :Preview status', function() require('preview.commands').setup() assert.has_no.errors(function()