Summary
The :CodePreviewStatus command (currently :ClaudePreviewStatus) only checks for Claude Code hooks. It should show the status of all available backends with install hints, making the plugin self-documenting for new users.
Current behavior
claude-preview.nvim status
────────────────────────────────────
Neovim socket : /tmp/nvim.sock
Hooks : not installed
jq : found
Diff tab : closed
Only checks for Claude Code hooks in .claude/settings.local.json. No mention of OpenCode.
Desired behavior
code-preview.nvim status
────────────────────────────────────
Neovim socket : /tmp/nvim.sock
jq : found
Diff tab : closed
Backends:
Claude Code : not installed → :CodePreviewInstallClaudeCodeHooks
OpenCode : not installed → :CodePreviewInstallOpenCodeHooks
- Show all available backends, not just installed ones
- Each backend shows its install status and the command to install/uninstall
- Helps new users discover what backends are available and how to set them up
Detection logic
- Claude Code: check for hook entries in
.claude/settings.local.json (look for the hook marker string)
- OpenCode: check for plugin files in
.opencode/plugins/ (e.g., index.ts)
Notes
Summary
The
:CodePreviewStatuscommand (currently:ClaudePreviewStatus) only checks for Claude Code hooks. It should show the status of all available backends with install hints, making the plugin self-documenting for new users.Current behavior
Only checks for Claude Code hooks in
.claude/settings.local.json. No mention of OpenCode.Desired behavior
Detection logic
.claude/settings.local.json(look for the hook marker string).opencode/plugins/(e.g.,index.ts)Notes
M.status()ininit.lua