diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 0af672a..cf2d2e7 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -196,10 +196,17 @@ under `~/.cache/dora/`. ### `plugins/` — LSP Server Plugins -32 LSP server plugin directories (plus `dora-jetbrains-plugin` for IDE -integration), each containing a `package.json` that declares dependencies. -LSP plugins are auto-installed via `npm install` into `$CLAUDE_PLUGIN_DATA` -on first session start. +33 LSP server plugin directories (plus `dora-jetbrains-plugin` for IDE +integration). 27 of them carry a `package.json` that declares their npm +dependencies; the rest either install through a toolchain (gopls, +rust-analyzer, ocaml-lsp) or ship with one (deno, gleam, swift). +A SessionStart hook auto-installs each server: npm-based plugins run +`npm install` into `$CLAUDE_PLUGIN_DATA`, gopls uses `go install` into the same +directory, and rust-analyzer and ocaml-lsp install into the active rustup +toolchain and opam switch. Every installing plugin declares a +`userConfig.auto_install` boolean +(default `true`); the hook reads it as `CLAUDE_PLUGIN_OPTION_AUTO_INSTALL` and +skips the install when it is off. Example (`plugins/typescript-lsp/package.json`): ```json diff --git a/README.md b/README.md index d6ab9c1..07833d9 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,17 @@ Install only the language servers you need: /plugin install rust-analyzer-lsp@code-intelligence ``` -> **Note:** Language server binaries are auto-installed via `npm install` on first session start. -> No manual binary installation is required. +> **Note:** Language servers are auto-installed at session start, so you don't install them by hand: +> +> - **npm-based servers** (including the biome and oxlint fallbacks): `npm install` into the +> plugin data directory on first start and whenever the plugin's `package.json` changes. +> - **`gopls`**: `go install`, **`rust-analyzer`**: `rustup component add`, **`ocamllsp`**: +> `opam install`. Each runs only when the server is missing and its toolchain (Go, rustup, +> opam) is on `PATH`. +> - **`deno`, `gleam`, `sourcekit-lsp`**: ship with their toolchains and are not installed. +> +> Each installing plugin has an **Auto-install language server** option (`auto_install`, default +> on). Turn it off in `/config` to stop session-start installs and updates for that plugin. ### Plugin management diff --git a/plugins/astro-lsp/.claude-plugin/plugin.json b/plugins/astro-lsp/.claude-plugin/plugin.json index 12cb83e..1968941 100644 --- a/plugins/astro-lsp/.claude-plugin/plugin.json +++ b/plugins/astro-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -33,5 +33,13 @@ } } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/bash-lsp/.claude-plugin/plugin.json b/plugins/bash-lsp/.claude-plugin/plugin.json index 0a25878..77d8251 100644 --- a/plugins/bash-lsp/.claude-plugin/plugin.json +++ b/plugins/bash-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "[ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/bash-language-server\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; [ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/bash-language-server\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -31,5 +31,13 @@ ".ksh": "shellscript" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/biome-lsp/.claude-plugin/plugin.json b/plugins/biome-lsp/.claude-plugin/plugin.json index 51d3980..149cf8c 100644 --- a/plugins/biome-lsp/.claude-plugin/plugin.json +++ b/plugins/biome-lsp/.claude-plugin/plugin.json @@ -6,6 +6,18 @@ "author": { "name": "PassionFactory" }, + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; [ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/biome\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" + } + ] + } + ] + }, "lspServers": { "biome": { "command": "bash", @@ -32,5 +44,13 @@ ".html": "html" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install @biomejs/biome into the plugin data directory at session start, used only when the project has no local biome and none is on PATH. Turn off to skip it.", + "default": true + } } } diff --git a/plugins/biome-lsp/package.json b/plugins/biome-lsp/package.json new file mode 100644 index 0000000..1716932 --- /dev/null +++ b/plugins/biome-lsp/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "@biomejs/biome": "2.6.2" + } +} diff --git a/plugins/biome-lsp/scripts/lsp.sh b/plugins/biome-lsp/scripts/lsp.sh index b0b7a74..39df978 100755 --- a/plugins/biome-lsp/scripts/lsp.sh +++ b/plugins/biome-lsp/scripts/lsp.sh @@ -2,5 +2,6 @@ set -euo pipefail if [ -x "./node_modules/.bin/biome" ]; then exec ./node_modules/.bin/biome lsp-proxy --stdio; fi if command -v biome &>/dev/null; then exec biome lsp-proxy --stdio; fi +if [ -n "${CLAUDE_PLUGIN_DATA:-}" ] && [ -x "${CLAUDE_PLUGIN_DATA}/node_modules/.bin/biome" ]; then exec "${CLAUDE_PLUGIN_DATA}/node_modules/.bin/biome" lsp-proxy --stdio; fi echo "[biome-lsp] biome not found. Install: npm install --save-dev @biomejs/biome" >&2 exit 1 diff --git a/plugins/clangd-lsp/.claude-plugin/plugin.json b/plugins/clangd-lsp/.claude-plugin/plugin.json index 49da599..9f13033 100644 --- a/plugins/clangd-lsp/.claude-plugin/plugin.json +++ b/plugins/clangd-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "[ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; [ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -38,5 +38,13 @@ ".h++": "cpp" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/code-intelligence-lsp/.claude-plugin/plugin.json b/plugins/code-intelligence-lsp/.claude-plugin/plugin.json index 045acc2..3fe4b29 100644 --- a/plugins/code-intelligence-lsp/.claude-plugin/plugin.json +++ b/plugins/code-intelligence-lsp/.claude-plugin/plugin.json @@ -12,11 +12,19 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } ] }, - "lspServers": "./.lsp.json" + "lspServers": "./.lsp.json", + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } + } } diff --git a/plugins/csharp-lsp/.claude-plugin/plugin.json b/plugins/csharp-lsp/.claude-plugin/plugin.json index c315b08..e0811f6 100644 --- a/plugins/csharp-lsp/.claude-plugin/plugin.json +++ b/plugins/csharp-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -29,5 +29,13 @@ ".cs": "csharp" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/dart-lsp/.claude-plugin/plugin.json b/plugins/dart-lsp/.claude-plugin/plugin.json index 3c6d9d2..77bdb80 100644 --- a/plugins/dart-lsp/.claude-plugin/plugin.json +++ b/plugins/dart-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "test -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; test -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -29,5 +29,13 @@ ".dart": "dart" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/dockerfile-lsp/.claude-plugin/plugin.json b/plugins/dockerfile-lsp/.claude-plugin/plugin.json index 11c5830..0602ccd 100644 --- a/plugins/dockerfile-lsp/.claude-plugin/plugin.json +++ b/plugins/dockerfile-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -28,5 +28,13 @@ ".dockerfile": "dockerfile" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/elixir-lsp/.claude-plugin/plugin.json b/plugins/elixir-lsp/.claude-plugin/plugin.json index d1f20e0..b954d7d 100644 --- a/plugins/elixir-lsp/.claude-plugin/plugin.json +++ b/plugins/elixir-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || (rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" && false)" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || (rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" && false) ;; esac" } ] } @@ -30,5 +30,13 @@ ".exs": "elixir" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/eslint-lsp/.claude-plugin/plugin.json b/plugins/eslint-lsp/.claude-plugin/plugin.json index f29e6a5..4f3cc20 100644 --- a/plugins/eslint-lsp/.claude-plugin/plugin.json +++ b/plugins/eslint-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -37,5 +37,13 @@ ".vue": "vue" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/fsharp-lsp/.claude-plugin/plugin.json b/plugins/fsharp-lsp/.claude-plugin/plugin.json index 4885859..47b398c 100644 --- a/plugins/fsharp-lsp/.claude-plugin/plugin.json +++ b/plugins/fsharp-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "([ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1) || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; ([ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1) || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -32,5 +32,13 @@ ".fsscript": "fsharp" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/gopls-lsp/.claude-plugin/plugin.json b/plugins/gopls-lsp/.claude-plugin/plugin.json index 9c940fd..b42e529 100644 --- a/plugins/gopls-lsp/.claude-plugin/plugin.json +++ b/plugins/gopls-lsp/.claude-plugin/plugin.json @@ -6,15 +6,36 @@ "author": { "name": "PassionFactory" }, + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) command -v gopls >/dev/null 2>&1 || { [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] && [ -x \"${CLAUDE_PLUGIN_DATA}/bin/gopls\" ]; } || ! command -v go >/dev/null 2>&1 || [ -z \"${CLAUDE_PLUGIN_DATA:-}\" ] || GOBIN=\"${CLAUDE_PLUGIN_DATA}/bin\" go install golang.org/x/tools/gopls@latest || true ;; esac", + "timeout": 300 + } + ] + } + ] + }, "lspServers": { "gopls": { - "command": "gopls", + "command": "bash", "args": [ - "serve" + "${CLAUDE_PLUGIN_ROOT}/scripts/lsp.sh" ], "extensionToLanguage": { ".go": "go" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "When gopls is not on PATH, install it into the plugin data directory with `go install` at session start (requires Go). Turn off to manage gopls yourself.", + "default": true + } } } diff --git a/plugins/gopls-lsp/scripts/lsp.sh b/plugins/gopls-lsp/scripts/lsp.sh new file mode 100755 index 0000000..696ba2f --- /dev/null +++ b/plugins/gopls-lsp/scripts/lsp.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail +if command -v gopls &>/dev/null; then exec gopls serve; fi +if [ -n "${CLAUDE_PLUGIN_DATA:-}" ] && [ -x "${CLAUDE_PLUGIN_DATA}/bin/gopls" ]; then exec "${CLAUDE_PLUGIN_DATA}/bin/gopls" serve; fi +echo "[gopls-lsp] gopls not found. Install: go install golang.org/x/tools/gopls@latest" >&2 +exit 1 diff --git a/plugins/graphql-lsp/.claude-plugin/plugin.json b/plugins/graphql-lsp/.claude-plugin/plugin.json index 103158b..a918577 100644 --- a/plugins/graphql-lsp/.claude-plugin/plugin.json +++ b/plugins/graphql-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -37,5 +37,13 @@ ".vue": "vue" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/jdtls-lsp/.claude-plugin/plugin.json b/plugins/jdtls-lsp/.claude-plugin/plugin.json index 632905e..41271ce 100644 --- a/plugins/jdtls-lsp/.claude-plugin/plugin.json +++ b/plugins/jdtls-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || (rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" && exit 1)" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || (rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" && exit 1) ;; esac" } ] } @@ -29,5 +29,13 @@ ".java": "java" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/kotlin-lsp/.claude-plugin/plugin.json b/plugins/kotlin-lsp/.claude-plugin/plugin.json index 1b9d31e..d23fd3c 100644 --- a/plugins/kotlin-lsp/.claude-plugin/plugin.json +++ b/plugins/kotlin-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -30,5 +30,13 @@ ".kts": "kotlin" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/lua-lsp/.claude-plugin/plugin.json b/plugins/lua-lsp/.claude-plugin/plugin.json index 6be8c9c..fbc8931 100644 --- a/plugins/lua-lsp/.claude-plugin/plugin.json +++ b/plugins/lua-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -29,5 +29,13 @@ ".lua": "lua" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/ocaml-lsp/.claude-plugin/plugin.json b/plugins/ocaml-lsp/.claude-plugin/plugin.json index ecfb200..cc8f71a 100644 --- a/plugins/ocaml-lsp/.claude-plugin/plugin.json +++ b/plugins/ocaml-lsp/.claude-plugin/plugin.json @@ -6,14 +6,37 @@ "author": { "name": "PassionFactory" }, + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) command -v ocamllsp >/dev/null 2>&1 || ! command -v opam >/dev/null 2>&1 || opam exec -- ocamllsp --version >/dev/null 2>&1 || opam install -y ocaml-lsp-server || true ;; esac", + "timeout": 600 + } + ] + } + ] + }, "lspServers": { "ocaml": { - "command": "ocamllsp", - "args": [], + "command": "bash", + "args": [ + "${CLAUDE_PLUGIN_ROOT}/scripts/lsp.sh" + ], "extensionToLanguage": { ".ml": "ocaml", ".mli": "ocaml" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "When ocamllsp is not available, install ocaml-lsp-server into the current opam switch at session start (requires opam; the first build can take minutes). Turn off to manage ocamllsp yourself.", + "default": true + } } } diff --git a/plugins/ocaml-lsp/scripts/lsp.sh b/plugins/ocaml-lsp/scripts/lsp.sh new file mode 100755 index 0000000..c16a59a --- /dev/null +++ b/plugins/ocaml-lsp/scripts/lsp.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail +if command -v ocamllsp &>/dev/null; then exec ocamllsp; fi +if command -v opam &>/dev/null && opam exec -- ocamllsp --version &>/dev/null; then exec opam exec -- ocamllsp; fi +echo "[ocaml-lsp] ocamllsp not found. Install: opam install ocaml-lsp-server" >&2 +exit 1 diff --git a/plugins/oxlint-lsp/.claude-plugin/plugin.json b/plugins/oxlint-lsp/.claude-plugin/plugin.json index cc6d6f8..830ce88 100644 --- a/plugins/oxlint-lsp/.claude-plugin/plugin.json +++ b/plugins/oxlint-lsp/.claude-plugin/plugin.json @@ -6,6 +6,18 @@ "author": { "name": "PassionFactory" }, + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; [ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/oxlint\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" + } + ] + } + ] + }, "lspServers": { "oxlint": { "command": "bash", @@ -26,5 +38,13 @@ ".svelte": "svelte" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install oxlint into the plugin data directory at session start, used only when the project has no local oxlint and none is on PATH. Turn off to skip it.", + "default": true + } } } diff --git a/plugins/oxlint-lsp/package.json b/plugins/oxlint-lsp/package.json new file mode 100644 index 0000000..b7055ef --- /dev/null +++ b/plugins/oxlint-lsp/package.json @@ -0,0 +1,6 @@ +{ + "private": true, + "dependencies": { + "oxlint": "1.94.0" + } +} diff --git a/plugins/oxlint-lsp/scripts/lsp.sh b/plugins/oxlint-lsp/scripts/lsp.sh index ed0dbde..6b427cd 100755 --- a/plugins/oxlint-lsp/scripts/lsp.sh +++ b/plugins/oxlint-lsp/scripts/lsp.sh @@ -4,5 +4,6 @@ if [ -x "./node_modules/.bin/oxc_language_server" ]; then exec ./node_modules/.b if command -v oxc_language_server &>/dev/null; then exec oxc_language_server; fi if [ -x "./node_modules/.bin/oxlint" ]; then exec ./node_modules/.bin/oxlint --lsp; fi if command -v oxlint &>/dev/null; then exec oxlint --lsp; fi +if [ -n "${CLAUDE_PLUGIN_DATA:-}" ] && [ -x "${CLAUDE_PLUGIN_DATA}/node_modules/.bin/oxlint" ]; then exec "${CLAUDE_PLUGIN_DATA}/node_modules/.bin/oxlint" --lsp; fi echo "[oxlint-lsp] oxlint/oxc_language_server not found. Install: npm install --save-dev oxlint" >&2 exit 1 diff --git a/plugins/php-lsp/.claude-plugin/plugin.json b/plugins/php-lsp/.claude-plugin/plugin.json index 7d858e3..c5dec40 100644 --- a/plugins/php-lsp/.claude-plugin/plugin.json +++ b/plugins/php-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -28,5 +28,13 @@ ".php": "php" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/prisma-lsp/.claude-plugin/plugin.json b/plugins/prisma-lsp/.claude-plugin/plugin.json index 906e060..4308771 100644 --- a/plugins/prisma-lsp/.claude-plugin/plugin.json +++ b/plugins/prisma-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -28,5 +28,13 @@ ".prisma": "prisma" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/pyright-lsp/.claude-plugin/plugin.json b/plugins/pyright-lsp/.claude-plugin/plugin.json index b5d62c3..2700f35 100644 --- a/plugins/pyright-lsp/.claude-plugin/plugin.json +++ b/plugins/pyright-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "[ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/pyright-langserver\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; [ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/pyright-langserver\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -29,5 +29,13 @@ ".pyi": "python" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/rubocop-lsp/.claude-plugin/plugin.json b/plugins/rubocop-lsp/.claude-plugin/plugin.json index 0e412fd..a859472 100644 --- a/plugins/rubocop-lsp/.claude-plugin/plugin.json +++ b/plugins/rubocop-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "[ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; [ -x \"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/code\" ] && diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -32,5 +32,13 @@ ".ru": "ruby" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/rust-analyzer-lsp/.claude-plugin/plugin.json b/plugins/rust-analyzer-lsp/.claude-plugin/plugin.json index 934efeb..8e7813b 100644 --- a/plugins/rust-analyzer-lsp/.claude-plugin/plugin.json +++ b/plugins/rust-analyzer-lsp/.claude-plugin/plugin.json @@ -6,6 +6,19 @@ "author": { "name": "PassionFactory" }, + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) rust-analyzer --version >/dev/null 2>&1 || ! command -v rustup >/dev/null 2>&1 || rustup component add rust-analyzer || true ;; esac", + "timeout": 300 + } + ] + } + ] + }, "lspServers": { "rust-analyzer": { "command": "rust-analyzer", @@ -14,5 +27,13 @@ ".rs": "rust" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "When rust-analyzer cannot run, add it with `rustup component add rust-analyzer` at session start (requires rustup). Turn off to manage rust-analyzer yourself.", + "default": true + } } } diff --git a/plugins/svelte-lsp/.claude-plugin/plugin.json b/plugins/svelte-lsp/.claude-plugin/plugin.json index 8c25b85..1e077e1 100644 --- a/plugins/svelte-lsp/.claude-plugin/plugin.json +++ b/plugins/svelte-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -28,5 +28,13 @@ ".svelte": "svelte" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/terraform-lsp/.claude-plugin/plugin.json b/plugins/terraform-lsp/.claude-plugin/plugin.json index defc879..95b50ed 100644 --- a/plugins/terraform-lsp/.claude-plugin/plugin.json +++ b/plugins/terraform-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -30,5 +30,13 @@ ".tfvars": "terraform-vars" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/texlab-lsp/.claude-plugin/plugin.json b/plugins/texlab-lsp/.claude-plugin/plugin.json index 6e377fd..edcdf77 100644 --- a/plugins/texlab-lsp/.claude-plugin/plugin.json +++ b/plugins/texlab-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -30,5 +30,13 @@ ".bib": "bibtex" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/typescript-lsp/.claude-plugin/plugin.json b/plugins/typescript-lsp/.claude-plugin/plugin.json index 9b33478..ee9a6b2 100644 --- a/plugins/typescript-lsp/.claude-plugin/plugin.json +++ b/plugins/typescript-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -35,5 +35,13 @@ ".cts": "typescript" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/vue-lsp/.claude-plugin/plugin.json b/plugins/vue-lsp/.claude-plugin/plugin.json index ce711ed..8702cb0 100644 --- a/plugins/vue-lsp/.claude-plugin/plugin.json +++ b/plugins/vue-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -36,5 +36,13 @@ } } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/yaml-lsp/.claude-plugin/plugin.json b/plugins/yaml-lsp/.claude-plugin/plugin.json index 61cdc59..978f7d3 100644 --- a/plugins/yaml-lsp/.claude-plugin/plugin.json +++ b/plugins/yaml-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -29,5 +29,13 @@ ".yml": "yaml" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } } diff --git a/plugins/zls-lsp/.claude-plugin/plugin.json b/plugins/zls-lsp/.claude-plugin/plugin.json index 803bfcd..8eeccf1 100644 --- a/plugins/zls-lsp/.claude-plugin/plugin.json +++ b/plugins/zls-lsp/.claude-plugin/plugin.json @@ -12,7 +12,7 @@ "hooks": [ { "type": "command", - "command": "diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\"" + "command": "case \"${CLAUDE_PLUGIN_OPTION_AUTO_INSTALL:-true}\" in [fF][aA][lL][sS][eE]|0|[nN][oO]|[oO][fF][fF]) ;; *) [ -n \"${CLAUDE_PLUGIN_DATA:-}\" ] || exit 0; diff -q \"${CLAUDE_PLUGIN_ROOT}/package.json\" \"${CLAUDE_PLUGIN_DATA}/package.json\" >/dev/null 2>&1 || (cd \"${CLAUDE_PLUGIN_DATA}\" && cp \"${CLAUDE_PLUGIN_ROOT}/package.json\" . && npm install --loglevel=error) || rm -f \"${CLAUDE_PLUGIN_DATA}/package.json\" ;; esac" } ] } @@ -30,5 +30,13 @@ ".zon": "zig" } } + }, + "userConfig": { + "auto_install": { + "type": "boolean", + "title": "Auto-install language server", + "description": "Install and update the language server in the plugin data directory at session start. Turn off to skip it; the server then runs whatever is already installed there.", + "default": true + } } }