mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-18 23:59:43 +01:00
[html/css/json] update services (#297113)
This commit is contained in:
committed by
GitHub
parent
74693a9e67
commit
36d424971f
@@ -7,7 +7,7 @@ import { window, workspace, Disposable, TextDocument, Position, SnippetString, T
|
||||
import { Runtime } from './htmlClient';
|
||||
import { LanguageParticipants } from './languageParticipants';
|
||||
|
||||
export function activateAutoInsertion(provider: (kind: 'autoQuote' | 'autoClose', document: TextDocument, position: Position) => Thenable<string>, languageParticipants: LanguageParticipants, runtime: Runtime): Disposable {
|
||||
export function activateAutoInsertion(provider: (kind: 'autoQuote' | 'autoClose', document: TextDocument, position: Position) => Thenable<string | null>, languageParticipants: LanguageParticipants, runtime: Runtime): Disposable {
|
||||
const disposables: Disposable[] = [];
|
||||
workspace.onDidChangeTextDocument(onDidChangeTextDocument, null, disposables);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ interface AutoInsertParams {
|
||||
}
|
||||
|
||||
namespace AutoInsertRequest {
|
||||
export const type: RequestType<AutoInsertParams, string, any> = new RequestType('html/autoInsert');
|
||||
export const type: RequestType<AutoInsertParams, string | null, any> = new RequestType('html/autoInsert');
|
||||
}
|
||||
|
||||
// experimental: semantic tokens
|
||||
@@ -209,7 +209,7 @@ async function startClientWithParticipants(languageParticipants: LanguagePartici
|
||||
toDispose.push(client.onRequest(CustomDataContent.type, customDataSource.getContent));
|
||||
|
||||
|
||||
const insertRequestor = (kind: 'autoQuote' | 'autoClose', document: TextDocument, position: Position): Promise<string> => {
|
||||
const insertRequestor = (kind: 'autoQuote' | 'autoClose', document: TextDocument, position: Position): Promise<string | null> => {
|
||||
const param: AutoInsertParams = {
|
||||
kind,
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),
|
||||
|
||||
Reference in New Issue
Block a user