[json/css/html] adopt lsp 316

This commit is contained in:
Martin Aeschlimann
2020-12-14 18:18:51 +01:00
parent c2a8940127
commit a22b5d54ad
24 changed files with 326 additions and 239 deletions

View File

@@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CancellationToken, ResponseError, ErrorCodes } from 'vscode-languageserver';
import { CancellationToken, ResponseError, LSPErrorCodes } from 'vscode-languageserver';
export function formatError(message: string, err: any): string {
if (err instanceof Error) {
@@ -64,5 +64,5 @@ export function runSafe<T, E>(func: () => T, errorVal: T, errorMessage: string,
function cancelValue<E>() {
console.log('cancelled');
return new ResponseError<E>(ErrorCodes.RequestCancelled, 'Request cancelled');
return new ResponseError<E>(LSPErrorCodes.RequestCancelled, 'Request cancelled');
}