Skip to content

feat(gopls): gopls-lazy を nvim / mise / Claude Code の Go LSP に統一#78

Draft
rin2yh wants to merge 2 commits into
mainfrom
claude/gopls-lazy-lsp-config-4ipfzc
Draft

feat(gopls): gopls-lazy を nvim / mise / Claude Code の Go LSP に統一#78
rin2yh wants to merge 2 commits into
mainfrom
claude/gopls-lazy-lsp-config-4ipfzc

Conversation

@rin2yh

@rin2yh rin2yh commented Jul 6, 2026

Copy link
Copy Markdown
Owner

概要

sivchari/gopls-lazy(gopls への drop-in プロキシ。大規模 Go モノレポの型チェックを動的にスコープし CPU/メモリ footprint を削減)を、Neovim・mise に続き Claude Code の Go LSP にも適用して統一する。

変更内容

mise / Neovim(既存コミット fcb1385

  • home/mise/config.toml: github:sivchari/gopls-lazy@v0.3.0 を追加
  • home/nvim/lua/lsp/gopls.lua: 起動コマンドを goplsgopls-lazy に変更

Claude Code(本コミット 9987870

  • Claude Code v2.0.74+ の LSP プラグイン機構を利用
  • home/claude/skills/gopls-lazy-lsp/.claude-plugin/plugin.json を新規追加し、lspServers.go.command = "gopls-lazy" を宣言
  • home/claude/settings.json: 公式 gopls-lsp@claude-plugins-officialgopls serve)を無効化し、gopls-lazy-lsp@skills-dir を有効化

設計上のポイント

  • skills-dir プラグイン~/.claude/skills/<name>/.claude-plugin/plugin.json)として in-place ロードされるため、marketplace 登録も install ステップも不要。
  • ~/.claude/skills は既に mkOutOfStoreSymlink でディレクトリごと symlink 済みなので、配下へのサブディレクトリ追加は nix rebuild 不要で反映される(home.file へのエントリ追加が発生しない)。
  • goplsmake toolsgo install golang.org/x/tools/gopls@latest)で導入済みで、gopls-lazy が PATH 上の gopls にプロキシする。バイナリ追加は不要。

動作確認

  • Claude Code 再起動(または /reload-plugins)後、/plugin の Errors タブに gopls-lazy 関連エラーが出ないこと
  • Go ファイル編集後に診断が Claude のコンテキストへ反映されること(go-to-definition / hover 等)

🤖 Generated with Claude Code

https://claude.ai/code/session_017Rf6W5zEyCWSuL8eoBGGHF


Generated by Claude Code

claude added 2 commits July 6, 2026 17:33
Claude Code v2.0.74+ の LSP プラグイン機構を使い、公式 gopls-lsp
(gopls serve) を無効化して gopls-lazy へ差し替える。

skills-dir プラグイン (~/.claude/skills 配下 + .claude-plugin/plugin.json)
として in-place ロードするため marketplace 登録・install 不要で、
既存の mkOutOfStoreSymlink 管理と整合する(nix rebuild 不要)。

これで nvim / mise に続き Claude Code も gopls-lazy に統一され、
大規模モノレポでの gopls CPU/メモリ footprint 削減が効く。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Rf6W5zEyCWSuL8eoBGGHF
`claude plugin validate` の author 未設定警告を解消。plugin list /
details で LSP servers(1) go として loaded になることを確認済み。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017Rf6W5zEyCWSuL8eoBGGHF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants