css/html/json typos (for #47894)

This commit is contained in:
Martin Aeschlimann
2018-04-16 14:11:12 +02:00
parent 96a741d712
commit 6657623b98
8 changed files with 13 additions and 13 deletions

View File

@@ -51,7 +51,7 @@ connection.onShutdown(() => {
let scopedSettingsSupport = false; let scopedSettingsSupport = false;
let workspaceFolders: WorkspaceFolder[]; let workspaceFolders: WorkspaceFolder[];
// After the server has started the client sends an initilize request. The server receives // After the server has started the client sends an initialize request. The server receives
// in the passed params the rootPath of the workspace plus the client capabilities. // in the passed params the rootPath of the workspace plus the client capabilities.
connection.onInitialize((params: InitializeParams): InitializeResult => { connection.onInitialize((params: InitializeParams): InitializeResult => {
workspaceFolders = (<any>params).workspaceFolders; workspaceFolders = (<any>params).workspaceFolders;

View File

@@ -81,8 +81,8 @@ let emmetSettings: any = {};
let currentEmmetExtensionsPath: string; let currentEmmetExtensionsPath: string;
const emmetTriggerCharacters = ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']; const emmetTriggerCharacters = ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];
// After the server has started the client sends an initilize request. The server receives // After the server has started the client sends an initialize request. The server receives
// in the passed params the rootPath of the workspace plus the client capabilites // in the passed params the rootPath of the workspace plus the client capabilities
connection.onInitialize((params: InitializeParams): InitializeResult => { connection.onInitialize((params: InitializeParams): InitializeResult => {
let initializationOptions = params.initializationOptions; let initializationOptions = params.initializationOptions;

View File

@@ -19,7 +19,7 @@ const JQUERY_D_TS = join(__dirname, '../../lib/jquery.d.ts');
const JS_WORD_REGEX = /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g; const JS_WORD_REGEX = /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g;
export function getJavascriptMode(documentRegions: LanguageModelCache<HTMLDocumentRegions>, workspace: Workspace): LanguageMode { export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocumentRegions>, workspace: Workspace): LanguageMode {
let jsDocuments = getLanguageModelCache<TextDocument>(10, 60, document => documentRegions.get(document).getEmbeddedDocument('javascript')); let jsDocuments = getLanguageModelCache<TextDocument>(10, 60, document => documentRegions.get(document).getEmbeddedDocument('javascript'));
let compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic }; let compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic };

View File

@@ -15,7 +15,7 @@ import { FoldingRange } from 'vscode-languageserver-protocol-foldingprovider';
import { getLanguageModelCache, LanguageModelCache } from '../languageModelCache'; import { getLanguageModelCache, LanguageModelCache } from '../languageModelCache';
import { getDocumentRegions, HTMLDocumentRegions } from './embeddedSupport'; import { getDocumentRegions, HTMLDocumentRegions } from './embeddedSupport';
import { getCSSMode } from './cssMode'; import { getCSSMode } from './cssMode';
import { getJavascriptMode } from './javascriptMode'; import { getJavaScriptMode } from './javascriptMode';
import { getHTMLMode } from './htmlMode'; import { getHTMLMode } from './htmlMode';
export { ColorInformation, ColorPresentation, Color }; export { ColorInformation, ColorPresentation, Color };
@@ -82,7 +82,7 @@ export function getLanguageModes(supportedLanguages: { [languageId: string]: boo
modes['css'] = getCSSMode(documentRegions, workspace); modes['css'] = getCSSMode(documentRegions, workspace);
} }
if (supportedLanguages['javascript']) { if (supportedLanguages['javascript']) {
modes['javascript'] = getJavascriptMode(documentRegions, workspace); modes['javascript'] = getJavaScriptMode(documentRegions, workspace);
} }
return { return {
getModeAtPosition(document: TextDocument, position: Position): LanguageMode | undefined { getModeAtPosition(document: TextDocument, position: Position): LanguageMode | undefined {

View File

@@ -76,7 +76,7 @@ export function testCompletionFor(value: string, expected: { count?: number, ite
} }
suite('HTML Completion', () => { suite('HTML Completion', () => {
test('HTML Javascript Completions', function (): any { test('HTML JavaScript Completions', function (): any {
testCompletionFor('<html><script>window.|</script></html>', { testCompletionFor('<html><script>window.|</script></html>', {
items: [ items: [
{ label: 'location', resultText: '<html><script>window.location</script></html>' }, { label: 'location', resultText: '<html><script>window.location</script></html>' },

View File

@@ -88,7 +88,7 @@ suite('HTML Folding', () => {
assertRanges(input, [r(0, 7), r(5, 6)]); assertRanges(input, [r(0, 7), r(5, 6)]);
}); });
test('Fold commment', () => { test('Fold comment', () => {
let input = [ let input = [
/*0*/'<!--', /*0*/'<!--',
/*1*/' multi line', /*1*/' multi line',
@@ -123,7 +123,7 @@ suite('HTML Folding', () => {
assertRanges(input, [r(0, 6), r(1, 5), r(2, 4), r(3, 4)]); assertRanges(input, [r(0, 6), r(1, 5), r(2, 4), r(3, 4)]);
}); });
test('Embedded JavaScript - mutiple areas', () => { test('Embedded JavaScript - multiple areas', () => {
let input = [ let input = [
/* 0*/'<html>', /* 0*/'<html>',
/* 1*/'<head>', /* 1*/'<head>',
@@ -177,7 +177,7 @@ suite('HTML Folding', () => {
assertRanges(input, [r(0, 9), r(1, 8), r(2, 7), r(3, 7, 'region'), r(4, 6, 'region')]); assertRanges(input, [r(0, 9), r(1, 8), r(2, 7), r(3, 7, 'region'), r(4, 6, 'region')]);
}); });
// test('Embedded JavaScript - mulit line comment', () => { // test('Embedded JavaScript - multi line comment', () => {
// let input = [ // let input = [
// /* 0*/'<html>', // /* 0*/'<html>',
// /* 1*/'<head>', // /* 1*/'<head>',

View File

@@ -62,7 +62,7 @@ documents.listen(connection);
let clientSnippetSupport = false; let clientSnippetSupport = false;
let clientDynamicRegisterSupport = false; let clientDynamicRegisterSupport = false;
// After the server has started the client sends an initilize request. The server receives // After the server has started the client sends an initialize request. The server receives
// in the passed params the rootPath of the workspace plus the client capabilities. // in the passed params the rootPath of the workspace plus the client capabilities.
connection.onInitialize((params: InitializeParams): InitializeResult => { connection.onInitialize((params: InitializeParams): InitializeResult => {

View File

@@ -77,7 +77,7 @@ suite('JSON Folding', () => {
assertRanges(input, [r(0, 4, 'array'), r(2, 3, 'array')]); assertRanges(input, [r(0, 4, 'array'), r(2, 3, 'array')]);
}); });
test('Fold commment', () => { test('Fold comment', () => {
let input = [ let input = [
/*0*/'/*', /*0*/'/*',
/*1*/' multi line', /*1*/' multi line',
@@ -86,7 +86,7 @@ suite('JSON Folding', () => {
assertRanges(input, [r(0, 2, 'comment')]); assertRanges(input, [r(0, 2, 'comment')]);
}); });
test('Incomplete commment', () => { test('Incomplete comment', () => {
let input = [ let input = [
/*0*/'/*', /*0*/'/*',
/*1*/'{', /*1*/'{',