Initial commit
This commit is contained in:
12
hooks/claude-code-hook.sh
Normal file
12
hooks/claude-code-hook.sh
Normal 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
26
hooks/hooks.json
Normal 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
12
hooks/start.sh
Normal 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
|
||||
Reference in New Issue
Block a user