32 lines
1.8 KiB
Diff
32 lines
1.8 KiB
Diff
diff --git i/packages/opencode/src/lsp/server.ts w/packages/opencode/src/lsp/server.ts
|
|
index 24da77edc..b94285ba8 100644
|
|
--- a/packages/opencode/src/lsp/server.ts
|
|
+++ b/packages/opencode/src/lsp/server.ts
|
|
@@ -94,7 +94,7 @@ export namespace LSPServer {
|
|
),
|
|
extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
|
|
async spawn(root) {
|
|
- const tsserver = await Bun.resolve("typescript/lib/tsserver.js", Instance.directory).catch(() => {})
|
|
+ const tsserver = await Bun.resolve("typescript/lib/tsserver.js", root).catch(() => {})
|
|
log.info("typescript server", { tsserver })
|
|
if (!tsserver) return
|
|
const proc = spawn(BunProc.which(), ["x", "typescript-language-server", "--stdio"], {
|
|
@@ -169,7 +169,7 @@ export namespace LSPServer {
|
|
root: NearestRoot(["package-lock.json", "bun.lockb", "bun.lock", "pnpm-lock.yaml", "yarn.lock"]),
|
|
extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts", ".vue"],
|
|
async spawn(root) {
|
|
- const eslint = await Bun.resolve("eslint", Instance.directory).catch(() => {})
|
|
+ const eslint = await Bun.resolve("eslint", root).catch(() => {})
|
|
if (!eslint) return
|
|
log.info("spawning eslint server")
|
|
const serverPath = path.join(Global.Path.bin, "vscode-eslint", "server", "out", "eslintServer.js")
|
|
@@ -1081,7 +1081,7 @@ export namespace LSPServer {
|
|
extensions: [".astro"],
|
|
root: NearestRoot(["package-lock.json", "bun.lockb", "bun.lock", "pnpm-lock.yaml", "yarn.lock"]),
|
|
async spawn(root) {
|
|
- const tsserver = await Bun.resolve("typescript/lib/tsserver.js", Instance.directory).catch(() => {})
|
|
+ const tsserver = await Bun.resolve("typescript/lib/tsserver.js", root).catch(() => {})
|
|
if (!tsserver) {
|
|
log.info("typescript not found, required for Astro language server")
|
|
return
|