mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
roll back vtsls
This commit is contained in:
parent
9c237f0bfb
commit
2c8d42d997
1 changed files with 9 additions and 5 deletions
|
|
@ -82,13 +82,12 @@ export namespace LSPServer {
|
|||
|
||||
export const Typescript: Info = {
|
||||
id: "typescript",
|
||||
root: NearestRoot(
|
||||
["package-lock.json", "bun.lockb", "bun.lock", "pnpm-lock.yaml", "yarn.lock"],
|
||||
["deno.json", "deno.jsonc"],
|
||||
),
|
||||
root: NearestRoot(["tsconfig.json", "package.json", "jsconfig.json", ".git"], ["deno.json", "deno.jsonc"]),
|
||||
extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
|
||||
async spawn(root) {
|
||||
const proc = spawn(BunProc.which(), ["x", "@vtsls/language-server", "--stdio"], {
|
||||
const tsserver = await Bun.resolve("typescript/lib/tsserver.js", root).catch(() => {})
|
||||
if (!tsserver) return
|
||||
const proc = spawn(BunProc.which(), ["x", "typescript-language-server", "--stdio"], {
|
||||
cwd: root,
|
||||
env: {
|
||||
...process.env,
|
||||
|
|
@ -97,6 +96,11 @@ export namespace LSPServer {
|
|||
})
|
||||
return {
|
||||
process: proc,
|
||||
initialization: {
|
||||
tsserver: {
|
||||
path: tsserver,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue