Skip to content

Support custom LSP servers via plugins #14226

Closed as duplicate
Closed as duplicate

Description

@ars-ppi

Currently the only way to add or override LSP servers is through the lsp field in opencode.json. This works but it means you have to put LSP config directly into the project/global config file, which gets messy if you want to share custom server setups across projects or keep them self-contained.

The plugin system already supports hooks for auth, tools, events, etc. It would be nice to also support an lsp hook that lets plugins register LSP servers — either adding new ones or overriding built-in ones.

Something like:

export default async function (input) {
  return {
    lsp: [
      {
        id: "my-custom-server",
        extensions: [".xyz"],
        command: ["my-lsp-server", "--stdio"],
        env: { ... },
        initialization: { ... },
      },
      {
        id: "typescript", // override built-in
        command: ["custom-tsserver", "--stdio"],
        extensions: [".ts", ".tsx"],
      },
    ],
  }
}

This way you can package LSP configs as reusable plugins (local .opencode/plugins/ files or npm packages) without touching opencode.json.

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 19, 2026
  2. github-actions commented on Feb 19, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • This appears to be a feature request, but the title does not start with [FEATURE]: as required by the feature request template.
    • The feature request template requires a verification checkbox confirming the feature hasn't been suggested before — this was not included.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of or related to existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)needs:complianceThis means the issue will auto-close after 2 hours.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions