33import * as vscode from 'vscode' ;
44import * as path from "path" ;
55import * as net from "net" ;
6+ import * as process from "process" ;
67import * as Annotator from "./annotator" ;
78import * as notifications from "./notifications" ;
89import findJava from "./findJava" ;
@@ -13,7 +14,7 @@ import { formatText } from 'lua-fmt';
1314import { LuaLanguageConfiguration } from './languageConfiguration' ;
1415
1516const LANGUAGE_ID = 'lua' ; //EmmyLua
16- const DEBUG_MODE = false ;
17+ var DEBUG_MODE = false ;
1718
1819export let savedContext : vscode . ExtensionContext ;
1920let client : LanguageClient ;
@@ -23,6 +24,7 @@ let javaExecutablePath: string|null;
2324
2425export function activate ( context : vscode . ExtensionContext ) {
2526 console . log ( "emmy lua actived!" ) ;
27+ DEBUG_MODE = process . env [ 'EMMY_DEV' ] === "true" ;
2628 savedContext = context ;
2729 progressBar = vscode . window . createStatusBarItem ( vscode . StatusBarAlignment . Left ) ;
2830 javaExecutablePath = findJava ( ) ;
@@ -102,6 +104,7 @@ function startClient() {
102104 } ,
103105 initializationOptions : {
104106 stdFolder : vscode . Uri . file ( path . resolve ( savedContext . extensionPath , "res/std" ) ) . toString ( ) ,
107+ apiFolders : [ ] ,
105108 workspaceFolders : vscode . workspace . workspaceFolders ? vscode . workspace . workspaceFolders . map ( f => f . uri . toString ( ) ) : null ,
106109 }
107110 } ;
0 commit comments