From 78dcefc9c6c46164dfa6e534608e663a396664a5 Mon Sep 17 00:00:00 2001 From: Lukas Scheller Date: Sat, 21 Sep 2024 17:59:19 +0200 Subject: [PATCH] Enable setting custom libraries path --- client/src/extension.ts | 10 ++++++++++ package.json | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/client/src/extension.ts b/client/src/extension.ts index 0af193e..c5567b4 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -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' }], diff --git a/package.json b/package.json index 6a75b58..85915b1 100644 --- a/package.json +++ b/package.json @@ -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" } } },