Skip to content

[FEATURE]: Disable LSP for external directories #7227

Description

@guillemus

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

Problem:

When agents (primary or subagents) explore external directories—such as cloned repos for reading documentation—OpenCode spawns LSP servers for those directories. This causes:

  • Long startup times (30+ seconds for large TypeScript monorepos or Java/JDTLS projects)
  • Wasted CPU/memory for LSP that provides no value
  • No benefit—when exploring external code for context, diagnostics aren't used

Use case:

Clone a library's repo to let the LLM search its docs/source. Only need file reading—LSP is unnecessary and harmful due to startup overhead.

Proposed solution:

{
  "lsp": {
    "external_directories": false
  }
}

Current workarounds (insufficient):

  • "lsp": false — Disables LSP entirely, including main project
  • Per-LSP "disabled": true — Too broad, affects all directories

Related issues (not duplicates):

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions