Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 9 additions & 1 deletion plugins/astro-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
10 changes: 9 additions & 1 deletion plugins/bash-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
20 changes: 20 additions & 0 deletions plugins/biome-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
}
}
}
6 changes: 6 additions & 0 deletions plugins/biome-lsp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"@biomejs/biome": "2.6.2"
}
}
1 change: 1 addition & 0 deletions plugins/biome-lsp/scripts/lsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 5 in plugins/biome-lsp/scripts/lsp.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=pleaseai_code-intelligence&issues=AaIBPVCEwEz4wE4bvjRI&open=AaIBPVCEwEz4wE4bvjRI&pullRequest=154

Check failure on line 5 in plugins/biome-lsp/scripts/lsp.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=pleaseai_code-intelligence&issues=AaIBXkRaqX3MR3The6O9&open=AaIBXkRaqX3MR3The6O9&pullRequest=154
echo "[biome-lsp] biome not found. Install: npm install --save-dev @biomejs/biome" >&2
exit 1
10 changes: 9 additions & 1 deletion plugins/clangd-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
12 changes: 10 additions & 2 deletions plugins/code-intelligence-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
10 changes: 9 additions & 1 deletion plugins/csharp-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
10 changes: 9 additions & 1 deletion plugins/dart-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
10 changes: 9 additions & 1 deletion plugins/dockerfile-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
10 changes: 9 additions & 1 deletion plugins/elixir-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
10 changes: 9 additions & 1 deletion plugins/eslint-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
10 changes: 9 additions & 1 deletion plugins/fsharp-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
25 changes: 23 additions & 2 deletions plugins/gopls-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
6 changes: 6 additions & 0 deletions plugins/gopls-lsp/scripts/lsp.sh
Original file line number Diff line number Diff line change
@@ -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

Check failure on line 4 in plugins/gopls-lsp/scripts/lsp.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=pleaseai_code-intelligence&issues=AaIBXkPpqX3MR3The6O8&open=AaIBXkPpqX3MR3The6O8&pullRequest=154

Check failure on line 4 in plugins/gopls-lsp/scripts/lsp.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=pleaseai_code-intelligence&issues=AaIBPVAPwEz4wE4bvjRH&open=AaIBPVAPwEz4wE4bvjRH&pullRequest=154
echo "[gopls-lsp] gopls not found. Install: go install golang.org/x/tools/gopls@latest" >&2
exit 1
10 changes: 9 additions & 1 deletion plugins/graphql-lsp/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand All @@ -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
}
}
}
Loading