LSP detection in monorepo not working #4665

Open
opened 2026-02-16 17:44:57 -05:00 by yindo · 1 comment
Owner

Originally created by @evanreichard on GitHub (Jan 10, 2026).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @evanreichard on GitHub (Jan 10, 2026). Originally assigned to: @thdxr on GitHub. ### 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_
yindo added the bug label 2026-02-16 17:44:57 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 10, 2026):

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

  • #6131: Pyright LSP - Virtual environment packages not resolved in monorepo setups (similar root cause of LSP configuration detection in monorepos)

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.

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be related to existing LSP monorepo issues. Please check: - #6131: Pyright LSP - Virtual environment packages not resolved in monorepo setups (similar root cause of LSP configuration detection in monorepos) 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4665