Skip to content

feat(lsp): add Claude Code LSP plugins with multi-language server support - #52

Merged
amondnet merged 4 commits into
mainfrom
feat/claude-code-lsp-plugins
Dec 21, 2025
Merged

feat(lsp): add Claude Code LSP plugins with multi-language server support#52
amondnet merged 4 commits into
mainfrom
feat/claude-code-lsp-plugins

Conversation

@amondnet

Copy link
Copy Markdown
Contributor

Summary

This PR adds 8 new LSP plugins for Claude Code, providing language server support for Tier 1 languages not covered by official Claude Code plugins. Each plugin includes automatic language server setup and configuration.

Changes

LSP Plugins (plugins/lsp/)

  • biome-lsp: Linting and formatting for JavaScript, TypeScript, JSON, CSS
  • vue-lsp: Vue 3 framework language support
  • svelte-lsp: Svelte framework language support
  • deno-lsp: Deno runtime with TypeScript support
  • prisma-lsp: Prisma ORM schema language support
  • astro-lsp: Astro framework language support
  • kotlin-lsp: Kotlin with JetBrains Kotlin LSP (auto-download with bundled JRE)
  • dart-lsp: Dart language with auto-download

Plugin Structure

Each plugin includes:

  • .claude-plugin/plugin.json - Plugin manifest
  • .lsp.json - LSP configuration
  • README.md - Setup instructions

LSP CLI (packages/lsp/src/cli.ts)

New CLI commands for language server setup:

  • lsp setup kotlin - Download and configure Kotlin LSP with bundled JRE (21.0.7)
  • lsp setup dart - Download and configure Dart SDK (v3.7.1)
  • lsp version - Show version info
  • lsp help - Show help

Key Features

  • Auto-download: Kotlin and Dart support automatic platform-specific binary downloads
  • Cross-platform: Linux (x64/arm64), Windows (x64), macOS (x64/arm64)
  • Cached: Downloaded binaries cached in ~/.cache/dora/
  • Bundled JRE: Kotlin includes bundled JRE (v21.0.7) - no external Java dependency
  • Easy setup: Single command to download and configure servers

Test Plan

  • Verify all 8 plugins load in Claude Code
  • Test Kotlin LSP setup: lsp setup kotlin
  • Test Dart SDK setup: lsp setup dart
  • Verify downloaded binaries are cached correctly
  • Test cross-platform downloads (Windows, macOS, Linux)
  • Confirm LSP diagnostics work for each language
  • Verify no external Java required for Kotlin (uses bundled JRE)

Related Issues

Closes #50

…port

Add comprehensive LSP (Language Server Protocol) plugin integration for Claude Code:

- Add LSP CLI for language server setup and management (kotlin, dart)
- Create 8 LSP plugins (astro, biome, dart, deno, kotlin, prisma, svelte, vue)
- Each plugin includes .claude-plugin metadata and LSP configuration
- Support Kotlin LSP launcher script for multiple platforms
- Add bin entry point for lsp CLI command in package.json

Supported language servers:
- Astro: Astro SFC with TypeScript support
- Biome: JavaScript/TypeScript linting and formatting
- Dart: Dart language server with Flutter support
- Deno: Deno runtime TypeScript/JavaScript
- Kotlin: Kotlin language server with Java 21 runtime
- Prisma: Prisma ORM schema editor
- Svelte: Svelte component development
- Vue: Vue 3 Single File Component support

Each plugin provides:
- .claude-plugin/plugin.json: Plugin metadata
- .lsp.json: LSP server configuration
- README.md: Setup and usage documentation
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @amondnet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the language server capabilities of Claude Code by integrating support for eight additional programming languages and frameworks. It introduces a new command-line tool to streamline the installation and configuration of these language servers, particularly for Kotlin and Dart, which now feature automated, cross-platform setup with bundled dependencies. This expansion aims to provide a richer development experience for a wider range of projects within the Claude Code environment.

Highlights

  • Expanded Language Server Support: Introduced 8 new LSP plugins for Claude Code, covering Tier 1 languages and frameworks such as Astro, Biome, Dart, Deno, Kotlin, Prisma, Svelte, and Vue, significantly broadening the IDE's capabilities.
  • New LSP Command-Line Interface (CLI): Added a dedicated lsp CLI tool to simplify the setup and management of language servers, including commands like lsp setup <server>, lsp version, and lsp help.
  • Automated Setup for Kotlin and Dart: Implemented automatic, cross-platform downloading and configuration for Kotlin LSP (including a bundled JRE) and Dart SDK, caching binaries locally for efficient and easy installation.
  • Standardized Plugin Structure: Each new LSP plugin adheres to a consistent structure, including a manifest (plugin.json), LSP configuration (.lsp.json), and a comprehensive README.md for clear setup instructions and feature descriptions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an impressive set of new LSP plugins and a CLI for managing them, which is a great enhancement. The auto-download feature for Kotlin and Dart is particularly useful. My review focuses on improving security and maintainability. I've suggested adding checksum validation for downloaded files to enhance security and dynamically fetching release information to improve long-term maintainability of hardcoded configurations. Overall, this is a solid contribution with a few areas for refinement.

Comment thread packages/lsp/src/cli.ts Outdated
Comment on lines +99 to +104
console.log('Downloading Java 21...')
await downloadAndExtract(javaConfig.url, javaDir)
if (!isWindows) {
await fs.chmod(javaPath, 0o755)
}
console.log('Java 21 installed')

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The downloadAndExtract function is used to fetch and unpack dependencies from the internet, but there's no validation of the downloaded file's integrity. This poses a security risk. If the download source is compromised, or in a man-in-the-middle attack, a malicious archive could be served, leading to arbitrary code execution on the user's machine.

It's highly recommended to add checksum validation (e.g., SHA256) for all downloaded artifacts. Many release pages (like on GitHub) provide checksums for their assets. These checksums should be stored in the configuration and verified after download, before extraction.

A similar concern applies to the Kotlin LSP download on line 114 and the Dart SDK download on line 161.

Comment thread packages/lsp/src/cli.ts Outdated
Comment on lines +25 to +64
const KOTLIN_CONFIG = {
version: '0.253.10629',
lspUrl: 'https://download-cdn.jetbrains.com/kotlin-lsp/0.253.10629/kotlin-0.253.10629.zip',
java: {
'win-x64': {
url: 'https://github.com/redhat-developer/vscode-java/releases/download/v1.42.0/java-win32-x64-1.42.0-561.vsix',
javaHomePath: 'extension/jre/21.0.7-win32-x86_64',
},
'linux-x64': {
url: 'https://github.com/redhat-developer/vscode-java/releases/download/v1.42.0/java-linux-x64-1.42.0-561.vsix',
javaHomePath: 'extension/jre/21.0.7-linux-x86_64',
},
'linux-arm64': {
url: 'https://github.com/redhat-developer/vscode-java/releases/download/v1.42.0/java-linux-arm64-1.42.0-561.vsix',
javaHomePath: 'extension/jre/21.0.7-linux-aarch64',
},
'osx-x64': {
url: 'https://github.com/redhat-developer/vscode-java/releases/download/v1.42.0/java-darwin-x64-1.42.0-561.vsix',
javaHomePath: 'extension/jre/21.0.7-macosx-x86_64',
},
'osx-arm64': {
url: 'https://github.com/redhat-developer/vscode-java/releases/download/v1.42.0/java-darwin-arm64-1.42.0-561.vsix',
javaHomePath: 'extension/jre/21.0.7-macosx-aarch64',
},
} as Record<string, { url: string, javaHomePath: string }>,
}

/**
* Dart SDK setup configuration
*/
const DART_CONFIG = {
version: '3.7.1',
platforms: {
'win-x64': 'https://storage.googleapis.com/dart-archive/channels/stable/release/3.7.1/sdk/dartsdk-windows-x64-release.zip',
'linux-x64': 'https://storage.googleapis.com/dart-archive/channels/stable/release/3.7.1/sdk/dartsdk-linux-x64-release.zip',
'linux-arm64': 'https://storage.googleapis.com/dart-archive/channels/stable/release/3.7.1/sdk/dartsdk-linux-arm64-release.zip',
'osx-x64': 'https://storage.googleapis.com/dart-archive/channels/stable/release/3.7.1/sdk/dartsdk-macos-x64-release.zip',
'osx-arm64': 'https://storage.googleapis.com/dart-archive/channels/stable/release/3.7.1/sdk/dartsdk-macos-arm64-release.zip',
} as Record<string, string>,
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The configuration objects KOTLIN_CONFIG and DART_CONFIG contain hardcoded version numbers and download URLs. This can become a maintenance burden, as the tool will quickly become outdated and require manual updates to the source code to support newer versions of the LSPs.

Consider fetching the latest stable release information dynamically. For dependencies hosted on GitHub, like vscode-java, you can use the GitHub API to get the latest release tag. For other dependencies, there might be a metadata file (e.g., a latest.json) you can query.

References
  1. When downloading dependencies from GitHub, prefer fetching the latest stable release tag dynamically via the GitHub API instead of using the 'master' branch to ensure stability.

@codecov

codecov Bot commented Dec 21, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.82%. Comparing base (bd66e30) to head (99ec6eb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #52   +/-   ##
=======================================
  Coverage   39.82%   39.82%           
=======================================
  Files          55       55           
  Lines        6345     6345           
=======================================
  Hits         2527     2527           
  Misses       3818     3818           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Integrate all LSP servers into the existing code-please plugin using
the `code lsp-server <id>` command. This approach leverages existing
root detection logic to safely activate servers only when appropriate
config files exist (e.g., biome.json for Biome, deno.json for Deno).

Changes:
- Add `lsp-server` command to @pleaseai/code CLI
- Add `lspServers` field to .claude-plugin/plugin.json (8 servers)
- Delete separate LSP plugin directories (plugins/lsp/*)
- Remove standalone CLI from @pleaseai/code-lsp package

Supported servers: biome, vue, svelte, deno, kotlin, dart, prisma, astro
Add ESLint and Oxlint language server configurations to the
Claude Code plugin for linting support.
…mand

- Add try-catch around server.spawn() with proper error logging
- Add stdin null check before piping
- Add process and pipe error handlers
- Fix Biome extensions (add 8 missing extensions)
- Add tests for lsp-server command edge cases
@amondnet
amondnet merged commit 06366c2 into main Dec 21, 2025
9 checks passed
@amondnet
amondnet deleted the feat/claude-code-lsp-plugins branch December 21, 2025 09:38
@passionfactory-bot passionfactory-bot Bot mentioned this pull request Dec 21, 2025
@passionfactory-bot passionfactory-bot Bot mentioned this pull request Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 20 additional LSP servers from OpenCode reference

1 participant