@@ -26,7 +26,7 @@ import {
2626} from 'vscode-languageserver/node'
2727import { TextDocument } from 'vscode-languageserver-textdocument'
2828import { URI } from 'vscode-uri'
29- import { showError , SilentError } from './util/error'
29+ import { formatError , showError , SilentError } from './util/error'
3030import glob from 'fast-glob'
3131import normalizePath from 'normalize-path'
3232import * as path from 'path'
@@ -94,12 +94,12 @@ declare var __non_webpack_require__: typeof require
9494const connection =
9595 process . argv . length <= 2 ? createConnection ( process . stdin , process . stdout ) : createConnection ( )
9696
97- // console.log = connection.console.log.bind(connection.console)
98- // console.error = connection.console.error.bind(connection.console)
97+ console . log = connection . console . log . bind ( connection . console )
98+ console . error = connection . console . error . bind ( connection . console )
9999
100- // process.on('unhandledRejection', (e: any) => {
101- // connection.console.error(formatError(`Unhandled exception`, e))
102- // })
100+ process . on ( 'unhandledRejection' , ( e : any ) => {
101+ connection . console . error ( formatError ( `Unhandled exception` , e ) )
102+ } )
103103
104104function normalizeFileNameToFsPath ( fileName : string ) {
105105 return URI . file ( fileName ) . fsPath
0 commit comments