-
Notifications
You must be signed in to change notification settings - Fork 510
/
Copy pathsettings.ts
45 lines (36 loc) · 1.37 KB
/
settings.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
'use strict';
import vscode = require('vscode');
export interface IScriptAnalysisSettings {
enable?: boolean
}
export interface IDeveloperSettings {
editorServicesHostPath?: string;
editorServicesLogLevel?: string;
editorServicesWaitForDebugger?: boolean;
}
export interface ISettings {
useX86Host?: boolean,
enableProfileLoading?: boolean,
scriptAnalysis?: IScriptAnalysisSettings,
developer?: IDeveloperSettings,
}
export function load(myPluginId: string): ISettings {
let configuration = vscode.workspace.getConfiguration(myPluginId);
let defaultScriptAnalysisSettings = {
enable: true
};
let defaultDeveloperSettings = {
editorServicesHostPath: "../bin/",
editorServicesLogLevel: "Normal",
editorServicesWaitForDebugger: false
}
return {
useX86Host: configuration.get<boolean>("useX86Host", false),
enableProfileLoading: configuration.get<boolean>("enableProfileLoading", false),
scriptAnalysis: configuration.get<IScriptAnalysisSettings>("scriptAnalysis", defaultScriptAnalysisSettings),
developer: configuration.get<IDeveloperSettings>("developer", defaultDeveloperSettings)
}
}