diff options
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/extension.ts | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/client/src/extension.ts b/client/src/extension.ts index e9936119..ae2a1d89 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -4,7 +4,7 @@ * ------------------------------------------------------------------------------------------ */ import * as path from 'path'; -import { workspace, ExtensionContext } from 'vscode'; +import { workspace, ExtensionContext, env } from 'vscode'; import { LanguageClient, @@ -16,13 +16,7 @@ import { let client: LanguageClient; export function activate(context: ExtensionContext) { - // The server is implemented in node - let serverModule = context.asAbsolutePath( - path.join('server', 'out', 'server.js') - ); - // The debug options for the server - // --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging - let debugOptions = { execArgv: ['--nolazy', '--inspect=6009'] }; + let language = env.language; // If the extension is launched in debug mode then the debug server options are used // Otherwise the run options are used @@ -33,6 +27,8 @@ export function activate(context: ExtensionContext) { ), args: [ '-E', + '-e', + 'LANG="' + language + '"', context.asAbsolutePath( path.join('server', 'main.lua') ) @@ -49,6 +45,8 @@ export function activate(context: ExtensionContext) { ), args: [ '-E', + '-e', + 'LANG="' + language + '"', context.asAbsolutePath( path.join('server', 'main.lua') ) @@ -73,8 +71,8 @@ export function activate(context: ExtensionContext) { // Create the language client and start the client. client = new LanguageClient( - 'languageServerExample', - 'Language Server Example', + 'sumneko.lua-lsp', + 'sumneko.lua-lsp', serverOptions, clientOptions ); |