'use strict' ; import * as path from 'path' ; import { workspace , Disposable , ExtensionContext , commands , WorkspaceEdit , TextEdit , Uri , Range , Position } from 'vscode' ; import { LanguageClient , LanguageClientOptions , SettingMonitor , ServerOptions , TransportKind , WorkspaceEdit as WorkspaceEditRaw , TextEdit as TextEditRaw , WillSaveTextDocumentWaitUntilRequest , Range as RangeRaw } from 'vscode-languageclient' ; export function activate ( context ) { let serverModule = context . asAbsolutePath ( path . join ( 'node_modules' , 'polymer-editor-service' , 'lib' , 'polymer-language-server.js' ) ) ; let debugOptions = { execArgv : [ '--nolazy' , '--debug=6004' ] } ; let serverOptions = { run : { module : serverModule , transport : TransportKind . stdio } , debug : { module : serverModule , transport : TransportKind . stdio , options : debugOptions } } ; let clientOptions = { documentSelector : [ 'html' , 'javascript' , 'css' , 'json' ] , synchronize : { configurationSection : 'polymer-ide' , fileEvents : workspace . createFileSystemWatcher ( '**' ) } , } ; const languageClient = new LanguageClient ( 'polymer-ide' , serverOptions , clientOptions ) ; const disposable = languageClient . start ( ) ; context . subscriptions . push ( disposable ) ; context . subscriptions . push ( disposable ) ; }