Skip to content

Enhancement: Show all available backends in status command #15

@Cannon07

Description

@Cannon07

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions