Move MD diagnostics to language server (#155653)

* Move MD diagnostics to language server

This switches us to using the LSP pull diagnostic model with a new version of the language service

* Bump package version

* Delete unused file
This commit is contained in:
Matt Bierner
2022-07-19 16:34:09 -07:00
committed by GitHub
parent db4ba2062d
commit 32f5e49082
26 changed files with 475 additions and 2474 deletions

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ILogger } from 'vscode-markdown-languageservice';
import { ILogger, LogLevel } from 'vscode-markdown-languageservice';
export class LogFunctionLogger implements ILogger {
@@ -31,8 +31,9 @@ export class LogFunctionLogger implements ILogger {
private readonly _logFn: typeof console.log
) { }
public verbose(title: string, message: string, data?: any): void {
this.appendLine(`[Verbose ${LogFunctionLogger.now()}] ${title}: ${message}`);
public log(level: LogLevel, title: string, message: string, data?: any): void {
this.appendLine(`[${level} ${LogFunctionLogger.now()}] ${title}: ${message}`);
if (data) {
this.appendLine(LogFunctionLogger.data2String(data));
}