11'use strict' ;
22
3- // The module 'vscode' contains the VS Code extensibility API
4- // Import the module and reference it with the alias vscode in your code below
53import * as vscode from 'vscode' ;
64import { PythonCompletionItemProvider } from './providers/completionProvider' ;
75import { PythonHoverProvider } from './providers/hoverProvider' ;
@@ -17,18 +15,14 @@ import * as path from 'path';
1715import * as settings from './common/configSettings'
1816import { activateUnitTestProvider } from './providers/testProvider' ;
1917
20- // import {PythonSignatureHelpProvider} from './providers/signatureProvider';
21-
2218const PYTHON : vscode . DocumentFilter = { language : 'python' , scheme : 'file' }
2319let unitTestOutChannel : vscode . OutputChannel ;
2420let formatOutChannel : vscode . OutputChannel ;
2521let lintingOutChannel : vscode . OutputChannel ;
2622
27- // this method is called when your extension is activated
28- // your extension is activated the very first time the command is executed
2923export function activate ( context : vscode . ExtensionContext ) {
3024 var rootDir = context . asAbsolutePath ( "." ) ;
31- var pythonSettings = new settings . PythonSettings ( ) ;
25+ var pythonSettings = settings . PythonSettings . getInstance ( ) ;
3226 unitTestOutChannel = vscode . window . createOutputChannel ( pythonSettings . unitTest . outputWindow ) ;
3327 unitTestOutChannel . clear ( ) ;
3428 formatOutChannel = unitTestOutChannel ;
@@ -42,7 +36,6 @@ export function activate(context: vscode.ExtensionContext) {
4236 lintingOutChannel . clear ( ) ;
4337 }
4438
45-
4639 sortImports . activate ( context ) ;
4740 activateUnitTestProvider ( context , pythonSettings , unitTestOutChannel ) ;
4841 activateFormatOnSaveProvider ( PYTHON , context , pythonSettings , formatOutChannel ) ;
@@ -63,10 +56,9 @@ export function activate(context: vscode.ExtensionContext) {
6356 context . subscriptions . push ( vscode . languages . registerReferenceProvider ( PYTHON , new PythonReferenceProvider ( context ) ) ) ;
6457 context . subscriptions . push ( vscode . languages . registerCompletionItemProvider ( PYTHON , new PythonCompletionItemProvider ( context ) , '.' ) ) ;
6558 context . subscriptions . push ( vscode . languages . registerDocumentSymbolProvider ( PYTHON , new PythonSymbolProvider ( context ) ) ) ;
66- // context.subscriptions.push(vscode.languages.registerSignatureHelpProvider(PYTHON, new PythonSignatureHelpProvider(context), '('));
6759
68- context . subscriptions . push ( vscode . languages . registerDocumentFormattingEditProvider ( PYTHON , new PythonFormattingEditProvider ( context , pythonSettings , formatOutChannel ) ) ) ;
69- context . subscriptions . push ( new LintProvider ( context , pythonSettings , lintingOutChannel ) ) ;
60+ context . subscriptions . push ( vscode . languages . registerDocumentFormattingEditProvider ( PYTHON , new PythonFormattingEditProvider ( context , formatOutChannel ) ) ) ;
61+ context . subscriptions . push ( new LintProvider ( context , lintingOutChannel ) ) ;
7062}
7163
7264// this method is called when your extension is deactivated
0 commit comments