Skip to content

feat(repo-maintenance): add Claude Code LSP setup check - #305

Merged
keito4 merged 1 commit into
mainfrom
feat/claude-code-lsp-support
Jan 4, 2026
Merged

feat(repo-maintenance): add Claude Code LSP setup check#305
keito4 merged 1 commit into
mainfrom
feat/claude-code-lsp-support

Conversation

@keito4

@keito4 keito4 commented Jan 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Claude Code LSP (Language Server Protocol) setup check to repo-maintenance command

Background

Claude Code v2.0.74+ supports LSP, enabling advanced code analysis features like:

  • Code completion
  • Definition jump
  • Reference search
  • Symbol navigation

Changes

Added Section 2.6: Claude Code LSP Setup Check

  • Detect project languages (TypeScript, Python, Go, Rust, PHP)
  • Check for .claude-plugin/plugin.json configuration
  • Verify language server installations
  • Provide setup instructions and examples

Configuration Examples

  • TypeScript: typescript-language-server
  • Python: python-lsp-server
  • Go: gopls
  • Rust: rust-analyzer
  • PHP: intelephense

Updated Components

  • Summary report includes LSP status
  • Related commands table updated
  • Environment category expanded

Benefits

✅ Automatic LSP detection and setup suggestions
✅ Language-specific configuration templates
✅ Improved code navigation in Claude Code
✅ Comprehensive language support

Test Plan

  • Run /repo-maintenance on TypeScript project
  • Verify LSP status detection
  • Check setup suggestions for missing language servers

Reference

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Claude Code LSP Setup Check documentation, including verification procedures, supported languages, configuration examples, and language server installation instructions.
    • Expanded environment variable guidance with expected results for various LSP configuration states.
    • Updated Related Commands section to reflect new LSP setup check.

✏️ Tip: You can customize this high-level summary in your review settings.

Add Claude Code LSP (Language Server Protocol) support check to the
repo-maintenance command's Environment category.

Changes:
- Add Section 2.6: Claude Code LSP Setup Check
- Include LSP configuration examples for TypeScript, Python, Go, Rust, PHP
- Add language server installation instructions
- Update summary report to include LSP status
- Add reference to Claude Code LSP guide

Benefits:
- Enables code analysis features (completion, definition jump, references)
- Supports major languages out of the box
- Provides automatic setup suggestions based on project type

Reference: https://blog.lai.so/claude-code-lsp/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jan 4, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The pull request adds documentation for a new "Claude Code LSP Setup Check" feature under Environment/Claude Code checks. It includes verification items for plugin configuration, supported languages, TypeScript examples, installation commands, environment variable guidance, and full-mode behavior for detecting project languages and proposing LSP settings.

Changes

Cohort / File(s) Summary
Documentation: Claude Code LSP Setup Check
.claude/commands/repo-maintenance.md
Introduces new subsection "2.6 Claude Code LSP Setup Check" with verification items (plugin.json, LSP server config, language server installations), supported languages list, TypeScript configuration example, installation commands, ENABLE_LSP_TOOL environment variable guidance, expected results for configured/unconfigured states, and full-mode detection logic for project languages (package.json, requirements.txt, go.mod, Cargo.toml, composer.json). Updates Related Commands section to reference the new LSP setup check. Minor content adjustments to example results showing LSP configuration status.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

released

Poem

🐰 A language server hops into view,
LSP configs checked, shiny and new!
TypeScript whispers, Go speaks with glee,
Setup checks bloom like clover, all three! 🌿

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a Claude Code LSP setup check feature to the repo-maintenance command.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6930d29 and 5d98408.

📒 Files selected for processing (1)
  • .claude/commands/repo-maintenance.md
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: keito4/config PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T03:45:17.253Z
Learning: Applies to .github/workflows/claude.yml : Trigger automatic AI assistance on claude mentions in issues, PRs, and comments using .github/workflows/claude.yml
Learnt from: CR
Repo: keito4/config PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T08:39:14.049Z
Learning: Follow development quality standards defined in `CLAUDE.md` when using Claude Code for development assistance
📚 Learning: 2025-12-09T08:39:14.049Z
Learnt from: CR
Repo: keito4/config PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T08:39:14.049Z
Learning: Follow development quality standards defined in `CLAUDE.md` when using Claude Code for development assistance

Applied to files:

  • .claude/commands/repo-maintenance.md
📚 Learning: 2025-12-01T03:45:17.253Z
Learnt from: CR
Repo: keito4/config PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-01T03:45:17.253Z
Learning: Applies to .github/workflows/claude.yml : Trigger automatic AI assistance on claude mentions in issues, PRs, and comments using .github/workflows/claude.yml

Applied to files:

  • .claude/commands/repo-maintenance.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: check-ci-status
🔇 Additional comments (1)
.claude/commands/repo-maintenance.md (1)

126-212: External references are valid and current.

Both URLs have been verified as active and accurate:

No action required.

Comment on lines +140 to +182
**対応言語:**

- TypeScript/JavaScript
- Python
- Go
- Rust
- PHP

**設定例(TypeScript):**

```json
{
"name": "project-lsp",
"lspServers": {
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".ts": "typescript",
".tsx": "typescriptreact",
".js": "javascript",
".jsx": "javascriptreact"
}
}
}
}
```

**必要な言語サーバ(グローバルインストール):**

```bash
# TypeScript/JavaScript
npm install -g typescript-language-server typescript

# Python
pip install python-lsp-server

# Go
go install golang.org/x/tools/gopls@latest

# Rust
rustup component add rust-analyzer
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing PHP language server installation command.

PHP is listed in the supported languages (line 146), but there's no corresponding installation instruction in the language server installation section. Add the installation command for intelephense, which is mentioned in the PR objectives as the recommended PHP language server.

🔎 Proposed addition
 # Rust
 rustup component add rust-analyzer
+
+# PHP
+npm install -g intelephense
🤖 Prompt for AI Agents
In .claude/commands/repo-maintenance.md around lines 140 to 182, the
"必要な言語サーバ(グローバルインストール)" section is missing the PHP language server install
command; add a line installing the recommended PHP server (intelephense) — e.g.
include the npm global install command for intelephense under the list (near the
other language install commands) so PHP has a corresponding installation
instruction.

| Environment | `/config-base-sync-update` | DevContainer 更新 |
| Environment | `/update-claude-code` | Claude Code 更新 |
| Environment | `/sync-claude-settings` | Claude 設定同期 |
| Environment | (Claude Code LSP setup) | LSP 設定 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify the Related Commands entry naming.

The Related Commands table lists (Claude Code LSP setup) without an actual command reference (e.g., /some-command), unlike other entries such as /container-health and /setup-husky. Clarify whether this check is intentionally embedded within /repo-maintenance only, or if a dedicated command should be referenced here.

🤖 Prompt for AI Agents
In .claude/commands/repo-maintenance.md around line 546, the Related Commands
table shows "(Claude Code LSP setup)" without a proper command reference;
clarify whether this is a standalone command or part of /repo-maintenance. Fix
by either (A) replacing the text with an explicit command reference (e.g.,
`/claude-code-lsp-setup`) and link to its section, or (B) annotate it as part of
/repo-maintenance (e.g., `/repo-maintenance — Claude Code LSP setup`) so it
matches the format of other entries; update the localized column accordingly if
present.

@claude

claude Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

PR Review: Claude Code LSP Setup Check

総合評価: ✅ Approved with Minor Suggestions

このPRは、repo-maintenanceコマンドにClaude Code LSPセットアップチェック機能を追加する優れた提案です。LSPサポートは開発者体験の大幅な向上につながります。


🎯 Strengths(強み)

1. 包括的なドキュメント

  • 5つの主要言語(TypeScript/JavaScript、Python、Go、Rust、PHP)をカバー
  • 具体的な設定例とインストールコマンドを提供
  • 参考URLを含め、ユーザーが自己解決できる構成

2. 一貫性のある構造

  • 既存の2.1〜2.5のパターンに沿った2.6の追加
  • サマリーレポート、Related Commandsテーブルの更新も適切
  • ステータス表示(✅/⚠️/📝)の統一感

3. 実用性

  • 言語検出ロジック(package.json → TypeScript、go.mod → Goなど)は実装しやすい
  • MODE=fullでの自動設定提案は開発者の負担を軽減

🔍 Code Quality Analysis

✅ Documentation Quality

  • 明確性: LSPとは何か、なぜ必要かが簡潔に説明されている
  • 実装可能性: 設定例、インストール手順が具体的
  • 保守性: 構造化されたセクション分けで将来の更新が容易

✅ Consistency with Repository Standards

  • CLAUDE.mdのフォーマット規約(Markdown見出し、箇条書き)に準拠
  • コードブロックに言語指定(json、bash)を明示
  • 日本語ドキュメントとして統一感あり

💡 Suggestions for Improvement(改善提案)

1. テストカバレッジの明確化

PR DescriptionのTest Planにチェックボックスがありますが、実際のテストコードや検証スクリプトへの言及がありません。

提案:

# 以下のようなテストケースを追加することを推奨
test/integration/lsp_detection.bats  # LSP検出ロジックのテスト

2. エラーハンドリングの記載

LSPサーバがインストールされていない場合、または.claude-plugin/plugin.jsonが不正な場合のエラーハンドリングについての記載がありません。

提案:

  • セクション2.6に「エラー時の動作:」を追加
  • 例: "設定ファイルが破損している場合は警告を表示し、スキップ"

3. 環境変数 ENABLE_LSP_TOOL=1 の位置づけ

この環境変数の設定がユーザーの責任なのか、repo-maintenanceが自動設定するのか不明確です。

提案:

  • MODEがfullの場合、.devcontainer/devcontainer.json.bashrcへの自動追記を検討
  • またはREADMEへの追記を提案する機能を追加

4. バージョン要件の明示

"Claude Code v2.0.74+ でサポート"と記載がありますが、古いバージョンを使用している場合の挙動が不明です。

提案:

  • バージョンチェックロジックを追加(2.4のClaude Code Update Checkと連携)
  • v2.0.74未満の場合は「LSPを利用するにはClaude Codeの更新が必要」と表示

🔒 Security Considerations

✅ No Security Concerns Detected

  • 外部リソースへのリンクは信頼できるソース(公式GitHub、公式ブログ)
  • 認証情報の露出なし
  • コマンド実行に関するインジェクションリスクなし

⚡ Performance Considerations

言語検出の効率性

複数のファイル存在チェック(package.jsonpyproject.tomlなど)を行う可能性がありますが、パフォーマンスへの影響は軽微です。

最適化案(Optional):

# 並列検出で高速化
find . -maxdepth 2 \( -name "package.json" -o -name "go.mod" -o -name "Cargo.toml" \) -print0 | xargs -0 -P 4 ...

📋 Test Coverage Evaluation

❓ Missing Test Evidence

PR DescriptionのTest Planはチェックされていませんが、以下のテストが必要です:

  1. ユニットテスト: 言語検出ロジック
  2. 統合テスト: repo-maintenance --mode fullの実行
  3. 回帰テスト: 既存の2.1〜2.5が影響を受けないこと

推奨アクション:

# 実行例
/repo-maintenance --mode full --skip "Setup,Cleanup,Discovery"
# → 2.6 Claude Code LSP Setup Checkのみ実行して動作確認

🎓 Alignment with Repository Philosophy

✅ TDD Principles

  • ドキュメント駆動開発(DDD)として先にドキュメントを整備 → Good

⚠️ Definition of Done

CLAUDE.mdの「Done」定義との照合:

  • Quality Gate Pass(ドキュメントのため該当なし)
  • ドキュメント更新(本PR自体がドキュメント)
  • モニタリング閾値内で安定 → 実装後に確認が必要
  • リリースノート記載 → PR DescriptionのSummaryで代替可能

🚀 Next Steps(次のステップ)

Immediate(このPRでマージ前に対応)

  1. Test Planのチェックボックスを実行して✓をつける
  2. エラーハンドリングのセクションを追加(Optional)

Follow-up(マージ後のフォローアップPR推奨)

  1. .claude/commands/lsp-setup.mdとして独立したコマンドを作成
  2. 自動設定スクリプト(script/setup-lsp.sh)の実装
  3. 統合テスト(test/integration/lsp_detection.bats)の追加

📝 Summary

Recommendation: ✅ Approve and Merge

このPRは以下の理由で承認可能です:

  • リポジトリの開発品質基準に適合
  • ドキュメントが明確で実装可能
  • セキュリティ・パフォーマンス上の問題なし
  • マイナーな改善提案はマージ後のフォローアップで対応可能

Commit Typeの確認:

  • feat(repo-maintenance): 正しいConventional Commits形式
  • ✅ Release-triggering type(semantic-releaseが自動リリース)

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

@keito4
keito4 merged commit 2e0f2eb into main Jan 4, 2026
6 checks passed
@github-actions

github-actions Bot commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.43.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions Bot added the released リリース済み label Jan 4, 2026
@keito4
keito4 deleted the feat/claude-code-lsp-support branch January 4, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant