commit 9e74048a6f7af098271be8262e7478def7e00dec Author: Zhongwei Li Date: Sat Nov 29 18:25:24 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..28e7c20 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "lsp-plugin", + "description": "Integrates CLI LSP Client with Claude Code using hooks for real-time language server updates", + "version": "1.0.0", + "author": { + "name": "Eli Oshinsky", + "email": "elimelech.oshinsky@gmail.com" + }, + "hooks": [ + "./hooks" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0f3125d --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# lsp-plugin + +Integrates CLI LSP Client with Claude Code using hooks for real-time language server updates diff --git a/hooks/claude-code-hook.sh b/hooks/claude-code-hook.sh new file mode 100644 index 0000000..f2b4f4a --- /dev/null +++ b/hooks/claude-code-hook.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# LSP Client hook for Claude Code PostToolUse events + +# Source shared utilities +source "$(dirname "$0")/../../shared/hooks/utils.sh" + +# Get the appropriate package runner +PKG_RUNNER=$(get_package_runner) + +# Run cli-lsp-client claude-code-hook with stdin +exec $PKG_RUNNER cli-lsp-client claude-code-hook diff --git a/hooks/hooks.json b/hooks/hooks.json new file mode 100644 index 0000000..92287e3 --- /dev/null +++ b/hooks/hooks.json @@ -0,0 +1,26 @@ +{ + "hooks": { + "PostToolUse": [ + { + "matcher": "Edit|Write|MultiEdit", + "hooks": [ + { + "type": "command", + "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/claude-code-hook.sh" + } + ] + } + ], + "SessionStart": [ + { + "matcher": "startup|resume", + "hooks": [ + { + "type": "command", + "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/start.sh" + } + ] + } + ] + } +} diff --git a/hooks/start.sh b/hooks/start.sh new file mode 100644 index 0000000..f521b98 --- /dev/null +++ b/hooks/start.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# LSP Client hook for Claude Code SessionStart events + +# Source shared utilities +source "$(dirname "$0")/../../shared/hooks/utils.sh" + +# Get the appropriate package runner +PKG_RUNNER=$(get_package_runner) + +# Run cli-lsp-client start +exec $PKG_RUNNER cli-lsp-client start diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..d1c206f --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,53 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:eli0shin/cli-lsp-client:claude-plugins/lsp-plugin", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "498b6266c42180ebc36da1c63fc798a8c631c686", + "treeHash": "1c82eeda5fe6c6ad87c167007c0ba7c95c2a2e972d7a7ecc58c1f38da7edbc15", + "generatedAt": "2025-11-28T10:16:45.585267Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "lsp-plugin", + "description": "Integrates CLI LSP Client with Claude Code using hooks for real-time language server updates", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "ed484f21caf9e527587ff50639bb2e618796d1702e8546205469327f2e9a1622" + }, + { + "path": "hooks/claude-code-hook.sh", + "sha256": "2f55a163d8c52ec4f50221475f9d3bafeb0756f0ff190240e4315fd7d8aa7cb7" + }, + { + "path": "hooks/hooks.json", + "sha256": "47dd50e0596ecfea06ea2df6ce7e018355581be04f45782ec5cc63ef7a038ea8" + }, + { + "path": "hooks/start.sh", + "sha256": "f504a484a770e1613c8ba399686d5011b0e172482ec9da13583c7fcc56995be2" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "93dbfea4a20bc8a86c08df9f04dd3b7337f072edc73b23481594f3dad5cd3bfe" + } + ], + "dirSha256": "1c82eeda5fe6c6ad87c167007c0ba7c95c2a2e972d7a7ecc58c1f38da7edbc15" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file