why is LSP showing as empty on opencode?
- User
why is LSP showing as empty on opencode?
Assistant
OpenCode's LSP feature requires a language server to be installed and configured for the language(s) in your project. The project here is Go-based, so it needs
goplsto be available.A few common reasons LSP shows as empty:
-
No language server installed — for Go,
goplsneeds to be on your$PATH. Check with:which goplsInstall if missing:
go install golang.org/x/tools/gopls@latest -
OpenCode config has no LSP entries — OpenCode may need explicit LSP configuration. Check
~/.config/opencode/config.jsonfor anlspsection. -
No
go.workor the module path is unresolvable — OpenCode might not detect the Go module if you're opening a subdirectory (bridge/) rather than the workspace root. -
Binary not found at session start — LSP servers are detected at launch; if
goplswasn't on$PATHwhen OpenCode started, it won't show up.
Which of these would you like me to investigate further?
-