mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
* Scaffold out basic markdown lsp This scaffolds out a new markdown language server and then uses it to implement document symbols. After the change, the markdown extension will have the following structure: - languageService — Where all the LSP language stuff will eventually land - server — The actual language server. Consumes ` languageService` - src — The current extension that launches the server and implements VS Code specific functions * Adding build scripts * a * Use language service from github * Remove ls build scripts * Bump versions * Only build ext * Enable for web * Fixing for browser
20 lines
824 B
TypeScript
20 lines
824 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* 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);
|