Explorar el Código

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

Aiden Cline hace 4 meses
padre
commit
f41a54b4b0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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) {
   async function getClients(file: string) {
     const s = await state()
     const s = await state()
-    const extension = path.parse(file).ext
+    const extension = path.parse(file).ext || file
     const result: LSPClient.Info[] = []
     const result: LSPClient.Info[] = []
     for (const server of Object.values(s.servers)) {
     for (const server of Object.values(s.servers)) {
       if (server.extensions.length && !server.extensions.includes(extension)) continue
       if (server.extensions.length && !server.extensions.includes(extension)) continue