'use strict' ; import * as vscode from 'vscode' ; import * as config from './config' ; import { DeclarationSupport } from './declaration' ; import { HoverSupport } from './hover' ; import { CompletionSupport } from './completion' ; import { setup } from './diagnostics' ; export function activate ( context ) { let flowPath ; if ( vscode . workspace . getConfiguration ( 'flow' ) . get ( 'path' ) ) { flowPath = vscode . workspace . getConfiguration ( 'flow' ) . get ( 'path' ) ; } if ( ! flowPath ) { return undefined ; } config . configure ( ) ; context . subscriptions . push ( vscode . languages . registerDefinitionProvider ( 'javascript' , new DeclarationSupport ( flowPath ) ) ) ; context . subscriptions . push ( vscode . languages . registerHoverProvider ( 'javascript' , new HoverSupport ( ) ) ) ; context . subscriptions . push ( vscode . languages . registerCompletionItemProvider ( 'javascript' , new CompletionSupport ( ) , '.' ) ) ; setup ( context . subscriptions , flowPath ) ; } export function deactivate ( ) { }