Skip to content

Support LSP servers configured in plugins/marketplace #1745

@neubig

Description

@neubig

Summary

Add runtime support for Language Server Protocol (LSP) servers that are configured in plugin marketplace entries. This enables plugins to provide enhanced code intelligence features like go-to-definition, find references, diagnostics, and completions for specific languages.

Context

The Anthropic Claude Code plugin marketplace schema includes lspServers configuration in plugin entries. For example, from anthropics/claude-plugins-official:

{
  "name": "typescript-lsp",
  "description": "TypeScript/JavaScript language server for enhanced code intelligence",
  "strict": false,
  "lspServers": {
    "typescript": {
      "command": "typescript-language-server",
      "args": ["--stdio"],
      "extensionToLanguage": {
        ".ts": "typescript",
        ".tsx": "typescriptreact"
      }
    }
  }
}

The official Anthropic marketplace includes LSP plugins for: TypeScript, Python (Pyright), Go, Rust, C/C++, PHP, Swift, Kotlin, C#, Java, and Lua.

Current State

The Marketplace datamodel in openhands.sdk.plugin now supports parsing lspServers from marketplace.json files (PR #1744), but there is no runtime support for actually starting and communicating with LSP servers.

Proposed Work

  1. LSP Client: Implement client to spawn and communicate with language servers via stdio
  2. Server Lifecycle: Start/stop LSP servers based on file types being edited
  3. Tool Exposure: Optionally expose LSP capabilities as agent tools
  4. File Routing: Use extensionToLanguage config to route requests to appropriate servers

Non-Goals

This is NOT about reimplementing all code editing to use LSP (that was the scope of OpenHands/OpenHands#1934). This is specifically about supporting the LSP server configurations that plugins/marketplaces can provide.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions