Skip to content

Commit 7b2f8cc

Browse files
committed
Add ability to specify custom path for elixirLS
1 parent b6e3739 commit 7b2f8cc

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"type": "boolean",
3333
"default": true,
3434
"description": "Enable elixir extension"
35+
},
36+
"elixir.pathToElixirLS": {
37+
"type": "string",
38+
"default": "",
39+
"description": "Custom path for elixirLS, use this options if you don't want use bundled elixirLS"
3540
}
3641
}
3742
}

src/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@ exports.activate = (context: ExtensionContext) => {
99
return;
1010
}
1111

12-
const command = context.asAbsolutePath('./els-release/language_server.sh');
12+
const getElsPath = () => {
13+
const { pathToElixirLS } = config;
14+
if (pathToElixirLS && pathToElixirLS.length > 0) {
15+
return pathToElixirLS;
16+
}
17+
18+
return context.asAbsolutePath('./els-release/language_server.sh');
19+
};
20+
21+
const command = getElsPath();
1322
const serverOptions = {
1423
command,
1524
};

0 commit comments

Comments
 (0)