|
|
@@ -82,12 +82,13 @@ export namespace LSPServer {
|
|
|
|
|
|
export const Typescript: Info = {
|
|
|
id: "typescript",
|
|
|
- root: NearestRoot(["tsconfig.json", "package.json", "jsconfig.json", ".git"], ["deno.json", "deno.jsonc"]),
|
|
|
+ root: NearestRoot(
|
|
|
+ ["package-lock.json", "bun.lockb", "bun.lock", "pnpm-lock.yaml", "yarn.lock"],
|
|
|
+ ["deno.json", "deno.jsonc"],
|
|
|
+ ),
|
|
|
extensions: [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"],
|
|
|
async spawn(root) {
|
|
|
- const tsserver = await Bun.resolve("typescript/lib/tsserver.js", root).catch(() => {})
|
|
|
- if (!tsserver) return
|
|
|
- const proc = spawn(BunProc.which(), ["x", "typescript-language-server", "--stdio"], {
|
|
|
+ const proc = spawn(BunProc.which(), ["x", "@vtsls/language-server", "--stdio"], {
|
|
|
cwd: root,
|
|
|
env: {
|
|
|
...process.env,
|
|
|
@@ -96,11 +97,6 @@ export namespace LSPServer {
|
|
|
})
|
|
|
return {
|
|
|
process: proc,
|
|
|
- initialization: {
|
|
|
- tsserver: {
|
|
|
- path: tsserver,
|
|
|
- },
|
|
|
- },
|
|
|
}
|
|
|
},
|
|
|
}
|