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

@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
import { RequestType } from 'vscode-languageserver';
import * as md from 'vscode-markdown-languageservice';
import * as lsp from 'vscode-languageserver-types';
import * as md from 'vscode-markdown-languageservice';
// From server
export const parseRequestType: RequestType<{ uri: string }, md.Token[], any> = new RequestType('markdown/parse');
@@ -14,5 +14,10 @@ export const statFileRequestType: RequestType<{ uri: string }, md.FileStat | und
export const readDirectoryRequestType: RequestType<{ uri: string }, [string, md.FileStat][], any> = new RequestType('markdown/readDirectory');
export const findFilesRequestTypes: RequestType<{}, string[], any> = new RequestType('markdown/findFiles');
export const createFileWatcher: RequestType<{ id: number; uri: string; options: md.FileWatcherOptions }, void, any> = new RequestType('markdown/createFileWatcher');
export const deleteFileWatcher: RequestType<{ id: number }, void, any> = new RequestType('markdown/deleteFileWatcher');
// To server
export const getReferencesToFileInWorkspace = new RequestType<{ uri: string }, lsp.Location[], any>('markdown/getReferencesToFileInWorkspace');
export const onWatcherChange: RequestType<{ id: number; uri: string; kind: 'create' | 'change' | 'delete' }, void, any> = new RequestType('markdown/onWatcherChange');