Scaffold out basic markdown language server (#154293)

* 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
This commit is contained in:
Matt Bierner
2022-07-06 16:03:24 -07:00
committed by GitHub
parent 3d3bfced96
commit ad9675f099
27 changed files with 626 additions and 151 deletions

View File

@@ -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);