Skip to content

Commit

Permalink
added an option to pass commandline args to DDPLS
Browse files Browse the repository at this point in the history
  • Loading branch information
bafto committed Sep 21, 2023
1 parent dce3689 commit 8c4398c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
"type": "boolean",
"default": false,
"description": "adds the --wortreich flag to $kddp starte"
},
"ddp.DDPLS.flags": {
"type": "array",
"default": "",
"description": "flags that are passed to the language server"
}
}
},
Expand Down Expand Up @@ -127,4 +132,4 @@
"mocha": "^10.0.0",
"typescript": "^4.7.2"
}
}
}
6 changes: 4 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ export function activate(ctx: vscode.ExtensionContext) {
out.appendLine("DDPPATH not found\nThis might cause errors in some commands");
}

let config = vscode.workspace.getConfiguration('ddp');
let lsArgs = config.get<string[]>("DDPLS.flags");
// DDPLS must be installed and in the PATH
let serverOptions: langsrv.ServerOptions = {
run: { command: "DDPLS" },
debug: { command: "DDPLS" }
run: { command: "DDPLS", args: lsArgs },
debug: { command: "DDPLS", args: lsArgs }
};

let clientOptions: langsrv.LanguageClientOptions = {
Expand Down

0 comments on commit 8c4398c

Please sign in to comment.