mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 16:45:22 +00:00
18 lines
689 B
TypeScript
18 lines
689 B
TypeScript
import lspExtension from "../node_modules/pi-lsp/extensions/pi-lsp/index.ts";
|
|
import { getAgentDir, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
import { fileURLToPath } from "node:url";
|
|
import { deployBundleLspConfig } from "./lsp-config.ts";
|
|
|
|
const TYPESCRIPT_LANGUAGE_SERVER_CLI = fileURLToPath(
|
|
new URL("../node_modules/typescript-language-server/lib/cli.mjs", import.meta.url),
|
|
);
|
|
|
|
/** Deploy the bundle-owned LSP config before registering pi-lsp. */
|
|
export default function bundledLspExtension(pi: ExtensionAPI): void {
|
|
deployBundleLspConfig(getAgentDir(), {
|
|
nodeBinary: process.execPath,
|
|
serverCliPath: TYPESCRIPT_LANGUAGE_SERVER_CLI,
|
|
});
|
|
lspExtension(pi);
|
|
}
|