Skip to content

Commit

Permalink
Add server-env option
Browse files Browse the repository at this point in the history
  • Loading branch information
nobodywasishere committed Jul 6, 2024
1 parent 4df634b commit 996923a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,17 @@ export async function activate(context: ExtensionContext): Promise<void> {

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: {
Expand Down

0 comments on commit 996923a

Please sign in to comment.