From 18235bacf97dc0e0971ffbaeba29badee7998960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 19 Sep 2019 21:47:51 +0800 Subject: =?UTF-8?q?=E6=94=B9=E4=B8=AA=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/extension.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'client/src') diff --git a/client/src/extension.ts b/client/src/extension.ts index 83a8f414..6e0c318d 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -29,30 +29,44 @@ export function activate(context: ExtensionContext) { } }; + let beta: boolean = workspace.getConfiguration("Lua.zzzzzz").get("cat"); let command: string; let platform: string = os.platform(); switch (platform) { case "win32": command = context.asAbsolutePath( - path.join('server', 'Windows', 'bin', 'lua-language-server.exe') + path.join( + beta ? 'server-beta' : 'server', + 'Windows', + 'bin', + beta ? 'lua-beta.exe' : 'lua.exe' + ) ); break; case "linux": command = context.asAbsolutePath( - path.join('server', 'Linux', 'bin', 'lua-language-server') + path.join( + beta ? 'server-beta' : 'server', + 'Linux', + 'bin', + beta? 'lua-beta' : 'lua' + ) ); fs.chmodSync(command, '777'); break; case "darwin": command = context.asAbsolutePath( - path.join('server', 'macOS', 'bin', 'lua-language-server') + path.join( + beta ? 'server-beta' : 'server', + 'macOS', + 'bin', + beta? 'lua-beta' : 'lua' + ) ); fs.chmodSync(command, '777'); break; } - let beta: boolean = workspace.getConfiguration("Lua.zzzzzz").get("cat"); - let serverOptions: ServerOptions = { command: command, args: [ -- cgit v1.2.3