Skip to content

Commit 57416ac

Browse files
author
WebFreak001
committed
Made phobos path configurable
1 parent e4bb2e1 commit 57416ac

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@
6767
"default": "workspace-d",
6868
"description": "Path of the workspace-d executable. Path can be omitted if in $PATH"
6969
},
70+
"d.stdlibPath": {
71+
"type": "array",
72+
"items": {
73+
"type": "string"
74+
},
75+
"default": ["/usr/include/dmd/druntime/import", "/usr/include/dmd/phobos"],
76+
"description": "Array of paths to phobos and D runtime for automatic inclusion for auto completion"
77+
},
7078
"d.dcdClientPath": {
7179
"type": "string",
7280
"default": "dcd-client",

src/workspace-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ export class WorkspaceD extends EventEmitter implements
501501
port: 9166
502502
}).then((data) => {
503503
this.request({ cmd: "dcd", subcmd: "setup-server" }).then((data) => {
504-
this.request({ cmd: "dcd", subcmd: "add-imports", imports: ["/usr/include/dmd/druntime/import", "/usr/include/dmd/phobos"] }).then((data) => {
504+
this.request({ cmd: "dcd", subcmd: "add-imports", imports: vscode.workspace.getConfiguration("d").get("stdlibPath", ["/usr/include/dmd/druntime/import", "/usr/include/dmd/phobos"]) }).then((data) => {
505505
console.log("DCD is ready");
506506
this.emit("dcd-ready");
507507
this.dcdReady = true;

0 commit comments

Comments
 (0)