Explorar o código

lsp: spawn only a single tsserver in project root

Dax Raad hai 7 meses
pai
achega
f383008cc1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/opencode/src/lsp/server.ts

+ 1 - 1
packages/opencode/src/lsp/server.ts

@@ -44,7 +44,7 @@ export namespace LSPServer {
 
 
   export const Typescript: Info = {
   export const Typescript: Info = {
     id: "typescript",
     id: "typescript",
-    roots: SimpleRoots(["tsconfig.json", "jsconfig.json", "package.json"]),
+    roots: async (app) => [app.path.root],
     extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
     extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
     async spawn(app, root) {
     async spawn(app, root) {
       const tsserver = await Bun.resolve("typescript/lib/tsserver.js", app.path.cwd).catch(() => {})
       const tsserver = await Bun.resolve("typescript/lib/tsserver.js", app.path.cwd).catch(() => {})