Skip to content

Commit e0a0279

Browse files
committed
Add windows support
Closes #4
1 parent eba3c59 commit e0a0279

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @flow
22

33
import { LanguageClient, services, ExtensionContext, workspace } from 'coc.nvim';
4+
import os from 'os';
45

56
export function activate(context: ExtensionContext) {
67
const config = workspace.getConfiguration().get('elixir', {});
@@ -15,7 +16,8 @@ export function activate(context: ExtensionContext) {
1516
return pathToElixirLS;
1617
}
1718

18-
return context.asAbsolutePath('./els-release/language_server.sh');
19+
const lsFileExtension = os.platform() === 'win32' ? 'bat' : 'sh';
20+
return context.asAbsolutePath(`./els-release/language_server.${lsFileExtension}`);
1921
};
2022

2123
const command = getElsPath();

0 commit comments

Comments
 (0)