Skip to content

Commit e6849ef

Browse files
committed
DEBUG_MODE
1 parent 803d19d commit e6849ef

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.vscode/launch.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
"outFiles": [
1717
"${workspaceFolder}/out/**/*.js"
1818
],
19+
"env": {
20+
"EMMY_DEV": "true"
21+
},
1922
"preLaunchTask": "npm: watch"
2023
},
2124
{

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import * as vscode from 'vscode';
44
import * as path from "path";
55
import * as net from "net";
6+
import * as process from "process";
67
import * as Annotator from "./annotator";
78
import * as notifications from "./notifications";
89
import findJava from "./findJava";
@@ -13,7 +14,7 @@ import { formatText } from 'lua-fmt';
1314
import { LuaLanguageConfiguration } from './languageConfiguration';
1415

1516
const LANGUAGE_ID = 'lua'; //EmmyLua
16-
const DEBUG_MODE = false;
17+
var DEBUG_MODE = false;
1718

1819
export let savedContext: vscode.ExtensionContext;
1920
let client: LanguageClient;
@@ -23,6 +24,7 @@ let javaExecutablePath: string|null;
2324

2425
export 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

Comments
 (0)