From 18b7cb872fadc86ecbc59b270c58ba0dae11b842 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Wed, 19 Feb 2020 14:22:12 +0000 Subject: [PATCH] [#27] Provide option for configuration file location To match the change brought in for https://github.com/erlang-ls/erlang_ls/issues/440 via https://github.com/erlang-ls/erlang_ls/pull/445 --- client/src/client.ts | 5 +++++ package.json | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/client/src/client.ts b/client/src/client.ts index fef9caa..a4749a2 100644 --- a/client/src/client.ts +++ b/client/src/client.ts @@ -18,6 +18,11 @@ export async function activate(context: ExtensionContext) { workspace.createFileSystemWatcher('**/rebar.config'), workspace.createFileSystemWatcher('**/rebar.lock') ] + }, + initializationOptions: { + erlang: { + config_path: workspace.getConfiguration('erlang_ls').get('config.path'), + } } }; diff --git a/package.json b/package.json index 2e59504..ab1c562 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,13 @@ "default": "", "description": "Override the default path of the erlang_ls executable with a custom one." + }, + "erlang_ls.config.path": { + "type": "string", + "description": "Path to the erlang_ls.config file. This can either be absolute or relative to the project root", + "default": "" } + } }, "languages": [