Browse Source

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

Aiden Cline 11 tháng trước cách đây
mục cha
commit
f41a54b4b0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/opencode/src/lsp/index.ts

+ 1 - 1
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