feat: add :checkhealth claudecode health check#275
Merged
Conversation
Adds lua/claudecode/health.lua so users can run :checkhealth claudecode to verify Neovim version, setup() state, Claude CLI availability, terminal provider, WebSocket server status, lock file presence, and live Claude connection state.
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.
Summary
Adds
:checkhealth claudecodesupport so users can diagnose their integration with Neovim's built-in health framework ("doctor").New module
lua/claudecode/health.luachecks, in order:setup()was called (+ plugin version)terminal_cmdorclaudeon PATH), + CLI versionexternalcmd valid, auto fallback)~/.claude/ide/(or$CLAUDE_CONFIG_DIR/ide/)is_claude_connected())Following checkhealth conventions the check is synchronous and side-effect free: it does not launch a Claude instance, but verifies every prerequisite for launching and reports live connection state, with actionable advice on each failure. Includes a
vim.health/require("health")compat shim for Neovim < 0.10.No changes to existing modules — all required state was already exposed.
Testing
tests/unit/health_spec.lua; full suite green (648/648)luacheck+ StyLua cleanAlso verified failure paths:
setup()not called (error + advice), missing CLI (error + advice), server not running (warning + advice).Generated with
mux• Model:anthropic:claude-fable-5• Thinking:high