feat(commands): unify into :MdRender <subcommand> dispatcher#12
Merged
Conversation
Consolidate the 7 top-level commands (:MdRender, :MdRenderTab, :MdRenderToggle, :MdRenderSplit, :MdRenderAuto, :MdRenderPager, :MdRenderDemo) into one :MdRender command with subcommands and two-level tab completion, following the convention used by Trouble v3, Telescope, and Lazy. The old commands remain registered as deprecated aliases that forward to the dispatcher and emit a one-shot vim.notify_once warning per session; they will be removed in a future major version. Closes #11. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11.
Summary
:MdRender <subcommand>dispatcher (float,tab,pager,toggle,split,auto on|off|toggle,demo), following the convention used by Trouble v3 / Telescope / Lazyon/off/toggleafterauto.:vert MdRender splitand other Vim modifiers compose naturally:MdRenderTab,:MdRenderToggle,:MdRenderSplit,:MdRenderAuto,:MdRenderPager,:MdRenderDemo) stay registered as deprecated aliases that forward to the dispatcher and emit a one-shot `vim.notify_once` warning per session. Slated for removal in a future major version<Plug>mappings unchanged — they bind to functions, not commands, so user keymaps don't break*:MdRender*block with new*:MdRender-{float,tab,toggle,split,auto,pager,demo}*sub-tags, plus deprecated stub blocks so:help :MdRenderTogglestill resolvesDesign notes
Per the issue's open questions (confirmed before implementation):
:MdRender demokept as a public subcommand (not hidden)width=120etc.) this round — open question deferred to a follow-upThe dispatcher lives in a new `lua/md-render/command.lua` module rather than inline in `plugin/md-render.lua` so it's unit-testable (the Makefile runs tests with `--noplugin`).
The repo has no `CHANGELOG.md` (release notes live in git commits and GitHub releases), so the issue's CHANGELOG line is dropped.
Test plan
🤖 Generated with Claude Code