mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 09:38:38 +01:00
[html] update to TextDocument and switch to incremental
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { LanguageModelCache, getLanguageModelCache } from '../languageModelCache';
|
||||
import { TextDocument, Position, Range, CompletionList } from 'vscode-languageserver-types';
|
||||
import { TextDocument, Position, Range, CompletionList } from 'vscode-html-languageservice';
|
||||
import { Stylesheet, FoldingRange, LanguageService as CSSLanguageService } from 'vscode-css-languageservice';
|
||||
import { LanguageMode, Workspace } from './languageModes';
|
||||
import { HTMLDocumentRegions, CSS_STYLE_RULE } from './embeddedSupport';
|
||||
@@ -68,4 +68,4 @@ export function getCSSMode(cssLanguageService: CSSLanguageService, documentRegio
|
||||
cssStylesheets.dispose();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { TextDocument, Range, TextEdit, FormattingOptions, Position } from 'vscode-languageserver-types';
|
||||
import { TextDocument, Range, TextEdit, FormattingOptions, Position } from 'vscode-html-languageservice';
|
||||
import { LanguageModes, Settings, LanguageModeRange } from './languageModes';
|
||||
import { pushAll } from '../utils/arrays';
|
||||
import { isEOL } from '../utils/strings';
|
||||
@@ -90,4 +90,4 @@ export function format(languageModes: LanguageModes, document: TextDocument, for
|
||||
languageModes.onDocumentRemoved(newDocument);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { TextDocument, CancellationToken, Position, Range } from 'vscode-languageserver';
|
||||
import { FoldingRange } from 'vscode-languageserver-types';
|
||||
import { FoldingRange } from 'vscode-html-languageservice';
|
||||
import { LanguageModes, LanguageMode } from './languageModes';
|
||||
|
||||
export function getFoldingRanges(languageModes: LanguageModes, document: TextDocument, maxRanges: number | undefined, _cancellationToken: CancellationToken | null): FoldingRange[] {
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { getLanguageModelCache } from '../languageModelCache';
|
||||
import { LanguageService as HTMLLanguageService, HTMLDocument, DocumentContext, FormattingOptions, HTMLFormatConfiguration, SelectionRange } from 'vscode-html-languageservice';
|
||||
import { TextDocument, Position, Range, CompletionItem, FoldingRange } from 'vscode-languageserver-types';
|
||||
import {
|
||||
LanguageService as HTMLLanguageService, HTMLDocument, DocumentContext, FormattingOptions,
|
||||
HTMLFormatConfiguration, SelectionRange,
|
||||
TextDocument, Position, Range, CompletionItem, FoldingRange
|
||||
} from 'vscode-html-languageservice';
|
||||
import { LanguageMode, Workspace } from './languageModes';
|
||||
import { getPathCompletionParticipant } from './pathCompletion';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
SymbolInformation, SymbolKind, CompletionItem, Location, SignatureHelp, SignatureInformation, ParameterInformation,
|
||||
Definition, TextEdit, TextDocument, Diagnostic, DiagnosticSeverity, Range, CompletionItemKind, Hover, MarkedString,
|
||||
DocumentHighlight, DocumentHighlightKind, CompletionList, Position, FormattingOptions, FoldingRange, FoldingRangeKind
|
||||
} from 'vscode-languageserver-types';
|
||||
} from 'vscode-html-languageservice';
|
||||
import { LanguageMode, Settings } from './languageModes';
|
||||
import { getWordAtText, startsWith, isWhitespaceOnly, repeat } from '../utils/strings';
|
||||
import { HTMLDocumentRegions } from './embeddedSupport';
|
||||
@@ -431,4 +431,4 @@ function generateIndent(level: number, options: FormattingOptions) {
|
||||
} else {
|
||||
return repeat('\t', level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,13 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { getCSSLanguageService } from 'vscode-css-languageservice';
|
||||
import { ClientCapabilities, DocumentContext, getLanguageService as getHTMLLanguageService, IHTMLDataProvider, SelectionRange } from 'vscode-html-languageservice';
|
||||
import { Color, ColorInformation, ColorPresentation, WorkspaceFolder } from 'vscode-languageserver';
|
||||
import { CompletionItem, CompletionList, Definition, Diagnostic, DocumentHighlight, DocumentLink, FoldingRange, FormattingOptions, Hover, Location, Position, Range, SignatureHelp, SymbolInformation, TextDocument, TextEdit } from 'vscode-languageserver-types';
|
||||
import {
|
||||
ClientCapabilities, DocumentContext, getLanguageService as getHTMLLanguageService, IHTMLDataProvider, SelectionRange,
|
||||
CompletionItem, CompletionList, Definition, Diagnostic, DocumentHighlight, DocumentLink, FoldingRange, FormattingOptions,
|
||||
Hover, Location, Position, Range, SignatureHelp, SymbolInformation, TextDocument, TextEdit,
|
||||
Color, ColorInformation, ColorPresentation
|
||||
} from 'vscode-html-languageservice';
|
||||
import { WorkspaceFolder } from 'vscode-languageserver';
|
||||
import { getLanguageModelCache, LanguageModelCache } from '../languageModelCache';
|
||||
import { getCSSMode } from './cssMode';
|
||||
import { getDocumentRegions, HTMLDocumentRegions } from './embeddedSupport';
|
||||
@@ -136,4 +140,4 @@ export function getLanguageModes(supportedLanguages: { [languageId: string]: boo
|
||||
modes = {};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { TextDocument, CompletionItemKind, CompletionItem, TextEdit, Range, Position } from 'vscode-languageserver-types';
|
||||
import { WorkspaceFolder } from 'vscode-languageserver';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { URI } from 'vscode-uri';
|
||||
import { ICompletionParticipant } from 'vscode-html-languageservice';
|
||||
import { ICompletionParticipant, TextDocument, CompletionItemKind, CompletionItem, TextEdit, Range, Position } from 'vscode-html-languageservice';
|
||||
import { startsWith } from '../utils/strings';
|
||||
import { contains } from '../utils/arrays';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user