Compare commits

..

5 Commits

Author SHA1 Message Date
Daisy Hollman
5f2db35c65 Fix hookify plugin import error: No module named 'hookify'
The hook scripts used absolute imports like `from hookify.core.config_loader`
but when installed, the plugin lives in a cache directory with a hash name,
not in a directory named `hookify/`. Python couldn't resolve the package.

Changed to local imports (`from core.X`) which work because PLUGIN_ROOT
is added to sys.path. Also simplified the sys.path setup.

Fixes: https://github.com/anthropics/claude-code/issues/14267

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 02:54:38 +00:00
Daisy S. Hollman
4bab8d0f50 Merge pull request #38 from anthropics/daisy/plugins/add-lsp-plugins
Add LSP plugins with inline lspServers configuration
2025-12-18 17:59:19 -08:00
Daisy Hollman
1d99e18048 Add installation instructions to LSP plugin READMEs
Each README now includes:
- Supported file extensions
- Installation commands for different platforms/package managers
- Links to project websites and documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 00:24:41 +00:00
Daisy Hollman
be56d7114b Add LSP plugins with inline lspServers configuration
This adds 10 LSP plugins to the official marketplace, each with inline
lspServers configuration. This enables the LSP plugin recommendation
feature to detect available LSP plugins directly from the marketplace.

LSP plugins added:
- typescript-lsp: TypeScript/JavaScript (.ts, .tsx, .js, .jsx, etc.)
- pyright-lsp: Python (.py, .pyi)
- gopls-lsp: Go (.go)
- rust-analyzer-lsp: Rust (.rs)
- clangd-lsp: C/C++ (.c, .h, .cpp, .cc, .hpp, etc.)
- php-lsp: PHP (.php)
- swift-lsp: Swift (.swift)
- csharp-lsp: C# (.cs)
- jdtls-lsp: Java (.java)
- lua-lsp: Lua (.lua)

Each plugin uses strict: false since they only provide LSP configuration
(no plugin.json manifest required).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-19 00:20:16 +00:00
Noah Zweben
68a5c3685f added new partners (#36) 2025-12-18 08:58:02 -08:00
16 changed files with 527 additions and 42 deletions

View File

@@ -7,6 +7,227 @@
"email": "support@anthropic.com"
},
"plugins": [
{
"name": "typescript-lsp",
"description": "TypeScript/JavaScript language server for enhanced code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/typescript-lsp",
"category": "development",
"strict": false,
"lspServers": {
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".ts": "typescript",
".tsx": "typescriptreact",
".js": "javascript",
".jsx": "javascriptreact",
".mts": "typescript",
".cts": "typescript",
".mjs": "javascript",
".cjs": "javascript"
}
}
}
},
{
"name": "pyright-lsp",
"description": "Python language server (Pyright) for type checking and code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/pyright-lsp",
"category": "development",
"strict": false,
"lspServers": {
"pyright": {
"command": "pyright-langserver",
"args": ["--stdio"],
"extensionToLanguage": {
".py": "python",
".pyi": "python"
}
}
}
},
{
"name": "gopls-lsp",
"description": "Go language server for code intelligence and refactoring",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/gopls-lsp",
"category": "development",
"strict": false,
"lspServers": {
"gopls": {
"command": "gopls",
"extensionToLanguage": {
".go": "go"
}
}
}
},
{
"name": "rust-analyzer-lsp",
"description": "Rust language server for code intelligence and analysis",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/rust-analyzer-lsp",
"category": "development",
"strict": false,
"lspServers": {
"rust-analyzer": {
"command": "rust-analyzer",
"extensionToLanguage": {
".rs": "rust"
}
}
}
},
{
"name": "clangd-lsp",
"description": "C/C++ language server (clangd) for code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/clangd-lsp",
"category": "development",
"strict": false,
"lspServers": {
"clangd": {
"command": "clangd",
"args": ["--background-index"],
"extensionToLanguage": {
".c": "c",
".h": "c",
".cpp": "cpp",
".cc": "cpp",
".cxx": "cpp",
".hpp": "cpp",
".hxx": "cpp",
".C": "cpp",
".H": "cpp"
}
}
}
},
{
"name": "php-lsp",
"description": "PHP language server (Intelephense) for code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/php-lsp",
"category": "development",
"strict": false,
"lspServers": {
"intelephense": {
"command": "intelephense",
"args": ["--stdio"],
"extensionToLanguage": {
".php": "php"
}
}
}
},
{
"name": "swift-lsp",
"description": "Swift language server (SourceKit-LSP) for code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/swift-lsp",
"category": "development",
"strict": false,
"lspServers": {
"sourcekit-lsp": {
"command": "sourcekit-lsp",
"extensionToLanguage": {
".swift": "swift"
}
}
}
},
{
"name": "csharp-lsp",
"description": "C# language server for code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/csharp-lsp",
"category": "development",
"strict": false,
"lspServers": {
"csharp-ls": {
"command": "csharp-ls",
"extensionToLanguage": {
".cs": "csharp"
}
}
}
},
{
"name": "jdtls-lsp",
"description": "Java language server (Eclipse JDT.LS) for code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/jdtls-lsp",
"category": "development",
"strict": false,
"lspServers": {
"jdtls": {
"command": "jdtls",
"extensionToLanguage": {
".java": "java"
},
"startupTimeout": 120000
}
}
},
{
"name": "lua-lsp",
"description": "Lua language server for code intelligence",
"version": "1.0.0",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com"
},
"source": "./plugins/lua-lsp",
"category": "development",
"strict": false,
"lspServers": {
"lua": {
"command": "lua-language-server",
"extensionToLanguage": {
".lua": "lua"
}
}
}
},
{
"name": "agent-sdk-dev",
"description": "Development kit for working with the Claude Agent SDK",

View File

@@ -0,0 +1,36 @@
# clangd-lsp
C/C++ language server (clangd) for Claude Code, providing code intelligence, diagnostics, and formatting.
## Supported Extensions
`.c`, `.h`, `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hxx`, `.C`, `.H`
## Installation
### Via Homebrew (macOS)
```bash
brew install llvm
# Add to PATH: export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
```
### Via package manager (Linux)
```bash
# Ubuntu/Debian
sudo apt install clangd
# Fedora
sudo dnf install clang-tools-extra
# Arch Linux
sudo pacman -S clang
```
### Windows
Download from [LLVM releases](https://github.com/llvm/llvm-project/releases) or install via:
```bash
winget install LLVM.LLVM
```
## More Information
- [clangd Website](https://clangd.llvm.org/)
- [Getting Started Guide](https://clangd.llvm.org/installation)

View File

@@ -0,0 +1,25 @@
# csharp-lsp
C# language server for Claude Code, providing code intelligence and diagnostics.
## Supported Extensions
`.cs`
## Installation
### Via .NET tool (recommended)
```bash
dotnet tool install --global csharp-ls
```
### Via Homebrew (macOS)
```bash
brew install csharp-ls
```
## Requirements
- .NET SDK 6.0 or later
## More Information
- [csharp-ls GitHub](https://github.com/razzmatazz/csharp-language-server)
- [.NET SDK Download](https://dotnet.microsoft.com/download)

View File

@@ -0,0 +1,20 @@
# gopls-lsp
Go language server for Claude Code, providing code intelligence, refactoring, and analysis.
## Supported Extensions
`.go`
## Installation
Install gopls using the Go toolchain:
```bash
go install golang.org/x/tools/gopls@latest
```
Make sure `$GOPATH/bin` (or `$HOME/go/bin`) is in your PATH.
## More Information
- [gopls Documentation](https://pkg.go.dev/golang.org/x/tools/gopls)
- [GitHub Repository](https://github.com/golang/tools/tree/master/gopls)

View File

@@ -7,7 +7,7 @@ from functools import lru_cache
from typing import List, Dict, Any, Optional
# Import from local module
from hookify.core.config_loader import Rule, Condition
from core.config_loader import Rule, Condition
# Cache compiled regexes (max 128 patterns)
@@ -275,7 +275,7 @@ class RuleEngine:
# For testing
if __name__ == '__main__':
from hookify.core.config_loader import Condition, Rule
from core.config_loader import Condition, Rule
# Test rule evaluation
rule = Rule(

View File

@@ -9,18 +9,14 @@ import os
import sys
import json
# CRITICAL: Add plugin root to Python path for imports
# Add plugin root to Python path for imports
PLUGIN_ROOT = os.environ.get('CLAUDE_PLUGIN_ROOT')
if PLUGIN_ROOT:
parent_dir = os.path.dirname(PLUGIN_ROOT)
if parent_dir not in sys.path:
sys.path.insert(0, parent_dir)
if PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
if PLUGIN_ROOT and PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
try:
from hookify.core.config_loader import load_rules
from hookify.core.rule_engine import RuleEngine
from core.config_loader import load_rules
from core.rule_engine import RuleEngine
except ImportError as e:
error_msg = {"systemMessage": f"Hookify import error: {e}"}
print(json.dumps(error_msg), file=sys.stdout)

View File

@@ -9,22 +9,14 @@ import os
import sys
import json
# CRITICAL: Add plugin root to Python path for imports
# We need to add the parent of the plugin directory so Python can find "hookify" package
# Add plugin root to Python path for imports
PLUGIN_ROOT = os.environ.get('CLAUDE_PLUGIN_ROOT')
if PLUGIN_ROOT:
# Add the parent directory of the plugin
parent_dir = os.path.dirname(PLUGIN_ROOT)
if parent_dir not in sys.path:
sys.path.insert(0, parent_dir)
# Also add PLUGIN_ROOT itself in case we have other scripts
if PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
if PLUGIN_ROOT and PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
try:
from hookify.core.config_loader import load_rules
from hookify.core.rule_engine import RuleEngine
from core.config_loader import load_rules
from core.rule_engine import RuleEngine
except ImportError as e:
# If imports fail, allow operation and log error
error_msg = {"systemMessage": f"Hookify import error: {e}"}

View File

@@ -9,18 +9,14 @@ import os
import sys
import json
# CRITICAL: Add plugin root to Python path for imports
# Add plugin root to Python path for imports
PLUGIN_ROOT = os.environ.get('CLAUDE_PLUGIN_ROOT')
if PLUGIN_ROOT:
parent_dir = os.path.dirname(PLUGIN_ROOT)
if parent_dir not in sys.path:
sys.path.insert(0, parent_dir)
if PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
if PLUGIN_ROOT and PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
try:
from hookify.core.config_loader import load_rules
from hookify.core.rule_engine import RuleEngine
from core.config_loader import load_rules
from core.rule_engine import RuleEngine
except ImportError as e:
error_msg = {"systemMessage": f"Hookify import error: {e}"}
print(json.dumps(error_msg), file=sys.stdout)

View File

@@ -9,18 +9,14 @@ import os
import sys
import json
# CRITICAL: Add plugin root to Python path for imports
# Add plugin root to Python path for imports
PLUGIN_ROOT = os.environ.get('CLAUDE_PLUGIN_ROOT')
if PLUGIN_ROOT:
parent_dir = os.path.dirname(PLUGIN_ROOT)
if parent_dir not in sys.path:
sys.path.insert(0, parent_dir)
if PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
if PLUGIN_ROOT and PLUGIN_ROOT not in sys.path:
sys.path.insert(0, PLUGIN_ROOT)
try:
from hookify.core.config_loader import load_rules
from hookify.core.rule_engine import RuleEngine
from core.config_loader import load_rules
from core.rule_engine import RuleEngine
except ImportError as e:
error_msg = {"systemMessage": f"Hookify import error: {e}"}
print(json.dumps(error_msg), file=sys.stdout)

View File

@@ -0,0 +1,33 @@
# jdtls-lsp
Java language server (Eclipse JDT.LS) for Claude Code, providing code intelligence and refactoring.
## Supported Extensions
`.java`
## Installation
### Via Homebrew (macOS)
```bash
brew install jdtls
```
### Via package manager (Linux)
```bash
# Arch Linux (AUR)
yay -S jdtls
# Other distros: manual installation required
```
### Manual Installation
1. Download from [Eclipse JDT.LS releases](https://download.eclipse.org/jdtls/snapshots/)
2. Extract to a directory (e.g., `~/.local/share/jdtls`)
3. Create a wrapper script named `jdtls` in your PATH
## Requirements
- Java 17 or later (JDK, not just JRE)
## More Information
- [Eclipse JDT.LS GitHub](https://github.com/eclipse-jdtls/eclipse.jdt.ls)
- [VSCode Java Extension](https://github.com/redhat-developer/vscode-java) (uses JDT.LS)

32
plugins/lua-lsp/README.md Normal file
View File

@@ -0,0 +1,32 @@
# lua-lsp
Lua language server for Claude Code, providing code intelligence and diagnostics.
## Supported Extensions
`.lua`
## Installation
### Via Homebrew (macOS)
```bash
brew install lua-language-server
```
### Via package manager (Linux)
```bash
# Ubuntu/Debian (via snap)
sudo snap install lua-language-server --classic
# Arch Linux
sudo pacman -S lua-language-server
# Fedora
sudo dnf install lua-language-server
```
### Manual Installation
Download pre-built binaries from the [releases page](https://github.com/LuaLS/lua-language-server/releases).
## More Information
- [Lua Language Server GitHub](https://github.com/LuaLS/lua-language-server)
- [Documentation](https://luals.github.io/)

24
plugins/php-lsp/README.md Normal file
View File

@@ -0,0 +1,24 @@
# php-lsp
PHP language server (Intelephense) for Claude Code, providing code intelligence and diagnostics.
## Supported Extensions
`.php`
## Installation
Install Intelephense globally via npm:
```bash
npm install -g intelephense
```
Or with yarn:
```bash
yarn global add intelephense
```
## More Information
- [Intelephense Website](https://intelephense.com/)
- [Intelephense on npm](https://www.npmjs.com/package/intelephense)

View File

@@ -0,0 +1,31 @@
# pyright-lsp
Python language server (Pyright) for Claude Code, providing static type checking and code intelligence.
## Supported Extensions
`.py`, `.pyi`
## Installation
Install Pyright globally via npm:
```bash
npm install -g pyright
```
Or with pip:
```bash
pip install pyright
```
Or with pipx (recommended for CLI tools):
```bash
pipx install pyright
```
## More Information
- [Pyright on npm](https://www.npmjs.com/package/pyright)
- [Pyright on PyPI](https://pypi.org/project/pyright/)
- [GitHub Repository](https://github.com/microsoft/pyright)

View File

@@ -0,0 +1,34 @@
# rust-analyzer-lsp
Rust language server for Claude Code, providing code intelligence and analysis.
## Supported Extensions
`.rs`
## Installation
### Via rustup (recommended)
```bash
rustup component add rust-analyzer
```
### Via Homebrew (macOS)
```bash
brew install rust-analyzer
```
### Via package manager (Linux)
```bash
# Ubuntu/Debian
sudo apt install rust-analyzer
# Arch Linux
sudo pacman -S rust-analyzer
```
### Manual download
Download pre-built binaries from the [releases page](https://github.com/rust-lang/rust-analyzer/releases).
## More Information
- [rust-analyzer Website](https://rust-analyzer.github.io/)
- [GitHub Repository](https://github.com/rust-lang/rust-analyzer)

View File

@@ -0,0 +1,25 @@
# swift-lsp
Swift language server (SourceKit-LSP) for Claude Code, providing code intelligence for Swift projects.
## Supported Extensions
`.swift`
## Installation
SourceKit-LSP is included with the Swift toolchain.
### macOS
Install Xcode from the App Store, or install Swift via:
```bash
brew install swift
```
### Linux
Download and install Swift from [swift.org](https://www.swift.org/download/).
After installation, `sourcekit-lsp` should be available in your PATH.
## More Information
- [SourceKit-LSP GitHub](https://github.com/apple/sourcekit-lsp)
- [Swift.org](https://www.swift.org/)

View File

@@ -0,0 +1,24 @@
# typescript-lsp
TypeScript/JavaScript language server for Claude Code, providing code intelligence features like go-to-definition, find references, and error checking.
## Supported Extensions
`.ts`, `.tsx`, `.js`, `.jsx`, `.mts`, `.cts`, `.mjs`, `.cjs`
## Installation
Install the TypeScript language server globally via npm:
```bash
npm install -g typescript-language-server typescript
```
Or with yarn:
```bash
yarn global add typescript-language-server typescript
```
## More Information
- [typescript-language-server on npm](https://www.npmjs.com/package/typescript-language-server)
- [GitHub Repository](https://github.com/typescript-language-server/typescript-language-server)