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
28
29
30
31
|
diff --git a/src/server.ts b/src/server.ts
index 88f9bf0230d5373f547be14d275b77363f13ea99..a6b4660640d6d29e8b94fc57de1572a4cf11ff9e 100644
--- a/src/server.ts
+++ b/src/server.ts
@@ -26,7 +26,7 @@ HoverRequest,
} from 'vscode-languageserver/node'
import { TextDocument } from 'vscode-languageserver-textdocument'
import { URI } from 'vscode-uri'
-import { showError, SilentError } from './util/error'
+import { formatError, showError, SilentError } from './util/error'
import glob from 'fast-glob'
import normalizePath from 'normalize-path'
import * as path from 'path'
@@ -94,12 +94,12 @@
const connection =
process.argv.length <= 2 ? createConnection(process.stdin, process.stdout) : createConnection()
-// console.log = connection.console.log.bind(connection.console)
-// console.error = connection.console.error.bind(connection.console)
+console.log = connection.console.log.bind(connection.console)
+console.error = connection.console.error.bind(connection.console)
-// process.on('unhandledRejection', (e: any) => {
-// connection.console.error(formatError(`Unhandled exception`, e))
-// })
+process.on('unhandledRejection', (e: any) => {
+ connection.console.error(formatError(`Unhandled exception`, e))
+})
function normalizeFileNameToFsPath(fileName: string) {
return URI.file(fileName).fsPath
|