Skip to content

[FEATURE]: Allow configuring project-specific LSP servers (e.g., basedpyright instead of pyright) #9472

Closed

Description

@nachitog83

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Description:

Currently, OpenCode uses built-in language servers for diagnostics. It would be helpful to allow projects to configure which LSP server to use, so that diagnostics match the project's actual tooling.

Use case:

Our project uses basedpyright (a stricter fork of pyright) for type checking. The built-in pyright sometimes shows different errors or misses issues that basedpyright catches. This leads to a workflow where I have to manually run basedpyright via bash after edits to verify there are no type errors.

Proposed solution:

Allow a configuration option (e.g., in opencode.json or project settings) to specify custom LSP servers per language:

{
  lsp: {
    python: basedpyright
  }
}

The LSP server should be resolved from the project's environment (e.g., virtual environment, node_modules, or PATH) and use the project's configuration files (e.g., pyrightconfig.json, pyproject.toml). This ensures diagnostics respect project-specific settings like strict mode, type checking rules, and import resolution.

This would make the in-editor diagnostics consistent with CI/pre-commit checks and reduce the need for manual verification steps.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 19, 2026
  2. github-actions commented on Jan 19, 2026

    @github-actions
    Contributor

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

    Feel free to ignore if your use case requires something specific these don't address!

  3. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions