Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:25:24 +08:00
commit 9e74048a6f
6 changed files with 118 additions and 0 deletions

12
hooks/claude-code-hook.sh Normal file
View File

@@ -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

26
hooks/hooks.json Normal file
View File

@@ -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"
}
]
}
]
}
}

12
hooks/start.sh Normal file
View File

@@ -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