https://github.com/zircote/scala-lsp
Claude Code plugin for Scala development with Metals LSP and scalafmt hooks
https://github.com/zircote/scala-lsp
claude-code-plugin code-quality jvm lsp metals scala
Last synced: 3 months ago
JSON representation
Claude Code plugin for Scala development with Metals LSP and scalafmt hooks
- Host: GitHub
- URL: https://github.com/zircote/scala-lsp
- Owner: zircote
- License: mit
- Created: 2026-01-02T21:03:23.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-02-28T01:36:12.000Z (4 months ago)
- Last Synced: 2026-02-28T03:44:24.239Z (4 months ago)
- Topics: claude-code-plugin, code-quality, jvm, lsp, metals, scala
- Language: Scala
- Size: 16.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scala-lsp
[](CHANGELOG.md)
[](LICENSE)
[](https://docs.anthropic.com/en/docs/claude-code/plugins)
[](https://github.com/zircote/lsp-marketplace)
[](https://www.scala-lang.org/)
A Claude Code plugin providing comprehensive Scala development support through:
- **Metals** LSP integration for IDE-like features
- **Automated hooks** for formatting, linting, and building
- **Scala ecosystem** integration (Scalafmt, Scalafix, SBT)
## Quick Setup
```bash
# Run the setup command (after installing the plugin)
/setup
```
Or manually:
```bash
# Install Metals via Coursier
cs install metals
# Install development tools
cs install scalafmt scalafix
```
## Features
### LSP Integration
The plugin configures Metals for Claude Code via `.lsp.json`:
```json
{
"scala": {
"command": "metals",
"args": [],
"extensionToLanguage": {
".scala": "scala",
".sc": "scala",
".sbt": "sbt"
},
"transport": "stdio"
}
}
```
**Capabilities:**
- Go to definition / references
- Hover documentation
- Code completion
- Refactoring support
- Real-time diagnostics
### Automated Hooks
| Hook | Trigger | Description |
|------|---------|-------------|
| `scalafmt` | `**/*.scala` | Code formatting |
| `scalafix` | `**/*.scala` | Linting and refactoring |
| `scala-todo-fixme` | `**/*.scala` | Surface TODO/FIXME comments |
## Required Tools
| Tool | Installation | Purpose |
|------|--------------|---------|
| `metals` | `cs install metals` | LSP server |
| `scalafmt` | `cs install scalafmt` | Formatting |
| `scalafix` | `cs install scalafix` | Linting |
## Project Structure
```
scala-lsp/
├── .claude-plugin/
│ └── plugin.json # Plugin metadata
├── .lsp.json # Metals configuration
├── commands/
│ └── setup.md # /setup command
├── hooks/
│ └── scripts/
│ └── scala-hooks.sh
├── tests/
│ └── SampleTest.scala # Test file
├── CLAUDE.md # Project instructions
└── README.md # This file
```
## License
MIT