From cfacef858e0914e6ee6a2e56bb345a7e058516a8 Mon Sep 17 00:00:00 2001 From: yiliang114 <1204183885@qq.com> Date: Tue, 26 Jul 2022 11:17:22 +0800 Subject: [PATCH] fix: typos --- lsp-log-streaming-sample/server/src/server.ts | 10 +++++----- .../client/src/browserClientMain.ts | 2 +- .../server/src/browserServerMain.ts | 2 +- test-provider-sample/src/extension.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lsp-log-streaming-sample/server/src/server.ts b/lsp-log-streaming-sample/server/src/server.ts index 474f0ded..86f499f4 100644 --- a/lsp-log-streaming-sample/server/src/server.ts +++ b/lsp-log-streaming-sample/server/src/server.ts @@ -136,7 +136,7 @@ async function validateTextDocument(textDocument: TextDocument): Promise { const diagnostics: Diagnostic[] = []; while ((m = pattern.exec(text)) && problems < settings.maxNumberOfProblems) { problems++; - const diagnosic: Diagnostic = { + const diagnostic: Diagnostic = { severity: DiagnosticSeverity.Warning, range: { start: textDocument.positionAt(m.index), @@ -146,24 +146,24 @@ async function validateTextDocument(textDocument: TextDocument): Promise { source: 'ex' }; if (hasDiagnosticRelatedInformationCapability) { - diagnosic.relatedInformation = [ + diagnostic.relatedInformation = [ { location: { uri: textDocument.uri, - range: Object.assign({}, diagnosic.range) + range: Object.assign({}, diagnostic.range) }, message: 'Spelling matters' }, { location: { uri: textDocument.uri, - range: Object.assign({}, diagnosic.range) + range: Object.assign({}, diagnostic.range) }, message: 'Particularly for names' } ]; } - diagnostics.push(diagnosic); + diagnostics.push(diagnostic); } // Send the computed diagnostics to VSCode. diff --git a/lsp-web-extension-sample/client/src/browserClientMain.ts b/lsp-web-extension-sample/client/src/browserClientMain.ts index 1cb5f669..9a776dca 100644 --- a/lsp-web-extension-sample/client/src/browserClientMain.ts +++ b/lsp-web-extension-sample/client/src/browserClientMain.ts @@ -15,7 +15,7 @@ export function activate(context: ExtensionContext) { /* * all except the code to create the language client in not browser specific - * and couuld be shared with a regular (Node) extension + * and could be shared with a regular (Node) extension */ const documentSelector = [{ language: 'plaintext' }]; diff --git a/lsp-web-extension-sample/server/src/browserServerMain.ts b/lsp-web-extension-sample/server/src/browserServerMain.ts index 43fc6456..be62dcee 100644 --- a/lsp-web-extension-sample/server/src/browserServerMain.ts +++ b/lsp-web-extension-sample/server/src/browserServerMain.ts @@ -21,7 +21,7 @@ const connection = createConnection(messageReader, messageWriter); connection.onInitialize((params: InitializeParams): InitializeResult => { const capabilities: ServerCapabilities = { - colorProvider: {} // provide a color providr + colorProvider: {} // provide a color provider }; return { capabilities }; }); diff --git a/test-provider-sample/src/extension.ts b/test-provider-sample/src/extension.ts index 0b4abe0c..815e3142 100644 --- a/test-provider-sample/src/extension.ts +++ b/test-provider-sample/src/extension.ts @@ -8,7 +8,7 @@ export async function activate(context: vscode.ExtensionContext) { const runHandler = (request: vscode.TestRunRequest, cancellation: vscode.CancellationToken) => { const queue: { test: vscode.TestItem; data: TestCase }[] = []; const run = ctrl.createTestRun(request); - // map of file uris to statments on each line: + // map of file uris to statements on each line: const coveredLines = new Map(); const discoverTests = async (tests: Iterable) => {