Skip to content

The open source coding agent.

TypeScript

fix: allow LSP filename matching when extension is missing (#2975)

Aiden Clinef41a54b4b018
diff --git a/packages/opencode/src/lsp/index.ts b/packages/opencode/src/lsp/index.ts
index 87dc1645225..6aa590d94c2 100644
--- a/packages/opencode/src/lsp/index.ts
+++ b/packages/opencode/src/lsp/index.ts
@@ -113,7 +113,7 @@ export namespace LSP {
async function getClients(file: string) {
const s = await state()
- const extension = path.parse(file).ext
+ const extension = path.parse(file).ext || file
const result: LSPClient.Info[] = []
for (const server of Object.values(s.servers)) {
if (server.extensions.length && !server.extensions.includes(extension)) continue