Skip to content

LSP detection in monorepo not working #7690

Closed as not planned
Closed as not planned

Description

@evanreichard

Description

In e.g. monorepos, where e.g. the frontend is separate from the backend, the eslint & tsserver LSP doesnt get enabled if starting opencode in the git root. If you go into the frontend folder, then LSP will properly enable.

NOTE: debug lsp diagnostics still shows it working in both, but it never gets enabled when reading or writing a file unless you start in the ./frontend root.

Plugins

N/A

OpenCode version

1.1.12

Steps to reproduce

  1. Create git root
  2. Create subfolder with frontend folder
  3. Init JS project (e.g. npm init)
  4. Open opencode in ./frontend -> LSP works, open opencode in ./, LSP doesnt.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Jan 10, 2026

    @github-actions
    Contributor

    This issue might be related to existing LSP monorepo issues. Please check:

    Feel free to ignore if this doesn't address your specific case. However, the pattern suggests that LSP root directory detection in monorepos may be a broader issue affecting multiple language servers.

  2. kobe2000 commented on Apr 14, 2026

    @kobe2000

    Human, this is an important issue~

  3. removed
    bugSomething isn't working
    on May 3, 2026
  4. samiralibabic commented on May 8, 2026

    @samiralibabic

    I added a more specific TypeScript repro and proposed narrow fix in #18694: #18694 (comment)

    This seems like one concrete instance of the broader monorepo/root-selection problem described here: OpenCode can be launched from the repo root while the language project for the target file lives in a child package.

    For TypeScript specifically, the low-risk first step would be to resolve typescript/lib/tsserver.js from the detected TypeScript workspace/LSP root first, then fall back to the launch directory. That would keep the change TypeScript-only while leaving a broader cross-language workspace-aware resolver design for separate discussion.

    I also saw the previous closed/stale attempts in #7691 and #17359. If maintainers are still open to the narrower TypeScript version, I can take a fresh pass rather than starting with a full LSP-manager redesign.

  5. sankalpmukim commented on May 13, 2026

    @sankalpmukim

    Dax removed the 'bug' label
    Don't know how this will be prioritized now 🫠

  6. geromueller commented on May 16, 2026

    @geromueller

    This is an huge issue! Problem seems to be the use of Filesystem.Up function, it should be down :-)

  7. github-actions commented on Jul 16, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions