MCPcopy Create free account
hub / github.com/csskit/csskit / activate

Function activate

packages/csskit_vscode/src/main.js:16–43  ·  view source on GitHub ↗

* @param {vscode.ExtensionContext} context * @returns {Promise }

(context)

Source from the content-addressed store, hash-verified

14 * @returns {Promise<void>}
15 */
16async function activate(context) {
17 const traceOutputChannel = vscode.window.createOutputChannel("csskit Language Server Trace");
18 const storageDir = context.globalStorageUri.fsPath;
19 await fsp.mkdir(storageDir, { recursive: true });
20
21 const binaryPath = await ensureBinary(storageDir);
22
23 const client = new LanguageClient(
24 "csskit",
25 "csskit Language Server",
26 {
27 run: {
28 command: binaryPath,
29 args: ["lsp"],
30 },
31 debug: {
32 command: binaryPath,
33 args: ["--debug", "lsp"],
34 },
35 },
36 {
37 documentSelector: [{ scheme: "file", language: "css" }],
38 diagnosticCollectionName: "csskit",
39 traceOutputChannel,
40 },
41 );
42 context.subscriptions.push(client.start());
43}
44
45/**
46 * @returns {{ platform: string, arch: string, exe: string }}

Callers

nothing calls this directly

Calls 2

ensureBinaryFunction · 0.85
startMethod · 0.45

Tested by

no test coverage detected