Custom LSPs seem to not work #1796

Closed
opened 2026-02-16 17:32:39 -05:00 by yindo · 2 comments
Owner

Originally created by @zelifish on GitHub (Sep 22, 2025).

Originally assigned to: @rekram1-node on GitHub.

Currently on version 0.11.1. As a sanity test I tried hooking up typescript lsp as a custom lsp with this config

{
    "$schema": "https://opencode.ai/config.json",
    "lsp": {
        "tsc":{
            "command": ["typescript-language-server",  "--stdio"],
            "extension": [".ts"]
        }
    }
}

When I attempt to debug this with

opencode debug lsp diagnostics ./foo.ts

Opencode just dies with logs like this:

INFO  2025-09-23T00:29:48 +44ms service=default version=0.11.1 args=["debug","lsp","diagnostics","./foo.ts"] opencode
INFO  2025-09-23T00:29:48 +0ms service=project directory=/path/to/project/metadata fromDirectory
INFO  2025-09-23T00:29:48 +127ms service=config path=/path/to/user/.config/opencode/config.json loading
INFO  2025-09-23T00:29:48 +4ms service=config path=/path/to/user/.config/opencode/opencode.json loading
INFO  2025-09-23T00:29:48 +1ms service=config path=/path/to/user/.config/opencode/opencode.jsonc loading
INFO  2025-09-23T00:29:48 +125ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin
INFO  2025-09-23T00:29:48 +2ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
INFO  2025-09-23T00:29:48 +18ms service=bus type=* subscribing
INFO  2025-09-23T00:29:48 +0ms service=bus type=session.updated subscribing
INFO  2025-09-23T00:29:48 +0ms service=bus type=message.updated subscribing
INFO  2025-09-23T00:29:48 +0ms service=bus type=message.part.updated subscribing
INFO  2025-09-23T00:29:48 +0ms service=format init
INFO  2025-09-23T00:29:48 +0ms service=bus type=file.edited subscribing
ERROR 2025-09-23T00:29:48 +2ms service=default name=TypeError message=undefined is not an object (evaluating 'existing.extensions') stack=TypeError: undefined is not an object (evaluating 'existing.extensions')
    at <anonymous> (/$bunfs/root/index.js:77351:48)
    at processTicksAndRejections (native:7:39) fatal
ERROR 2025-09-23T00:29:48 +1ms service=default e=undefined is not an object (evaluating 'existing.extensions') rejection

I was originally trying to setup pkl-lsp (apple pickle file lsp) and ran into issues but I couldn't even get what I thought should be a basic hello world common lsp setup, so I must be missing something. Or its broken perhaps.

Originally created by @zelifish on GitHub (Sep 22, 2025). Originally assigned to: @rekram1-node on GitHub. Currently on version 0.11.1. As a sanity test I tried hooking up typescript lsp as a custom lsp with this config ```json { "$schema": "https://opencode.ai/config.json", "lsp": { "tsc":{ "command": ["typescript-language-server", "--stdio"], "extension": [".ts"] } } } ``` When I attempt to debug this with ``` opencode debug lsp diagnostics ./foo.ts ``` Opencode just dies with logs like this: ``` INFO 2025-09-23T00:29:48 +44ms service=default version=0.11.1 args=["debug","lsp","diagnostics","./foo.ts"] opencode INFO 2025-09-23T00:29:48 +0ms service=project directory=/path/to/project/metadata fromDirectory INFO 2025-09-23T00:29:48 +127ms service=config path=/path/to/user/.config/opencode/config.json loading INFO 2025-09-23T00:29:48 +4ms service=config path=/path/to/user/.config/opencode/opencode.json loading INFO 2025-09-23T00:29:48 +1ms service=config path=/path/to/user/.config/opencode/opencode.jsonc loading INFO 2025-09-23T00:29:48 +125ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin INFO 2025-09-23T00:29:48 +2ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin INFO 2025-09-23T00:29:48 +18ms service=bus type=* subscribing INFO 2025-09-23T00:29:48 +0ms service=bus type=session.updated subscribing INFO 2025-09-23T00:29:48 +0ms service=bus type=message.updated subscribing INFO 2025-09-23T00:29:48 +0ms service=bus type=message.part.updated subscribing INFO 2025-09-23T00:29:48 +0ms service=format init INFO 2025-09-23T00:29:48 +0ms service=bus type=file.edited subscribing ERROR 2025-09-23T00:29:48 +2ms service=default name=TypeError message=undefined is not an object (evaluating 'existing.extensions') stack=TypeError: undefined is not an object (evaluating 'existing.extensions') at <anonymous> (/$bunfs/root/index.js:77351:48) at processTicksAndRejections (native:7:39) fatal ERROR 2025-09-23T00:29:48 +1ms service=default e=undefined is not an object (evaluating 'existing.extensions') rejection ``` I was originally trying to setup `pkl-lsp` (apple pickle file lsp) and ran into issues but I couldn't even get what I thought should be a basic hello world common lsp setup, so I must be missing something. Or its broken perhaps.
yindo closed this issue 2026-02-16 17:32:39 -05:00
Author
Owner

@rekram1-node commented on GitHub (Sep 22, 2025):

I found issue I will fix shortly

@rekram1-node commented on GitHub (Sep 22, 2025): I found issue I will fix shortly
Author
Owner

@rekram1-node commented on GitHub (Sep 22, 2025):

@zelifish you need to use "extensions" btw not extension

{
    "$schema": "https://opencode.ai/config.json",
    "lsp": {
        "tsc":{
            "command": ["typescript-language-server",  "--stdio"],
            "extensions": [".ts"]
        }
    }
}
@rekram1-node commented on GitHub (Sep 22, 2025): @zelifish you need to use "extensions" btw not extension ``` { "$schema": "https://opencode.ai/config.json", "lsp": { "tsc":{ "command": ["typescript-language-server", "--stdio"], "extensions": [".ts"] } } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1796