diff --git a/src/extension.ts b/src/extension.ts index 7106db2..8b34507 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -60,8 +60,17 @@ export async function activate(context: ExtensionContext): Promise { if (existsSync(lsp)) { crystalOutputChannel.appendLine(`[Crystal] loading lsp ${lsp}`) + const server_env = config["server-env"] + + let serverOptions: ServerOptions = { + command: lsp, + args: [] + } + + if (server_env) { + serverOptions.options = { env: { ...process.env, ...server_env } } + } - let serverOptions: ServerOptions = { command: lsp, args: [] } let clientOptions: LanguageClientOptions = { documentSelector: selector, synchronize: {