Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/markdown-language-features/server/src/node/main.ts')
-rw-r--r--extensions/markdown-language-features/server/src/node/main.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/extensions/markdown-language-features/server/src/node/main.ts b/extensions/markdown-language-features/server/src/node/main.ts
new file mode 100644
index 00000000000..609948b803d
--- /dev/null
+++ b/extensions/markdown-language-features/server/src/node/main.ts
@@ -0,0 +1,19 @@
+/*---------------------------------------------------------------------------------------------
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
+ *--------------------------------------------------------------------------------------------*/
+
+import { Connection, createConnection } from 'vscode-languageserver/node';
+import { startServer } from '../server';
+
+// Create a connection for the server.
+const connection: Connection = createConnection();
+
+console.log = connection.console.log.bind(connection.console);
+console.error = connection.console.error.bind(connection.console);
+
+process.on('unhandledRejection', (e: any) => {
+ connection.console.error(`Unhandled exception ${e}`);
+});
+
+startServer(connection);