forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascriptMain.ts
More file actions
27 lines (19 loc) · 1.01 KB
/
javascriptMain.ts
File metadata and controls
27 lines (19 loc) · 1.01 KB
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
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { addJSONProviders } from './features/jsonContributions';
import * as httpRequest from 'request-light';
import { ExtensionContext, env, workspace } from 'vscode';
import * as nls from 'vscode-nls';
export function activate(context: ExtensionContext): any {
nls.config({ locale: env.language });
configureHttpRequest();
workspace.onDidChangeConfiguration(e => configureHttpRequest());
context.subscriptions.push(addJSONProviders(httpRequest.xhr));
}
function configureHttpRequest() {
let httpSettings = workspace.getConfiguration('http');
httpRequest.configure(httpSettings.get<string>('proxy'), httpSettings.get<boolean>('proxyStrictSSL'));
}