Skip to content

Commit

Permalink
Enable setting custom libraries path
Browse files Browse the repository at this point in the history
  • Loading branch information
Schottkyc137 committed Sep 21, 2024
1 parent 5fb9f73 commit 78dcefc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ export async function activate(ctx: ExtensionContext) {
break;
}

let librariesLocation = workspace
.getConfiguration()
.get('vhdlls.standardLibraries');

if (lsBinary !== 'docker' && librariesLocation) {
const args = ['--libraries', librariesLocation as string];
serverOptions.run.args = args;
serverOptions.debug.args = args;
}

// Options to control the language client
let clientOptions: LanguageClientOptions = {
documentSelector: [{ scheme: 'file', language: 'vhdl' }],
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
"Add the file to an anonymous library and analyze that file"
],
"default": "analyze"
},
"vhdlls.standardLibraries": {
"type": "string",
"description": "Defines the path where the VHDL standard libraries (ieee, std, ...) are located. If omitted, will search in pre-defined standard paths for these libraries"
}
}
},
Expand Down

0 comments on commit 78dcefc

Please sign in to comment.