mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Adds inlineCompletionsNew and inlineCompletionsAdditions proposed APIs to avoid breaking changes when finalizing inline completions API.
This commit is contained in:
@@ -495,6 +495,13 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
checkProposedApiEnabled(extension, 'inlineCompletions');
|
||||
return extHostLanguageFeatures.registerInlineCompletionsProvider(extension, checkSelector(selector), provider);
|
||||
},
|
||||
registerInlineCompletionItemProviderNew(selector: vscode.DocumentSelector, provider: vscode.InlineCompletionItemProviderNew): vscode.Disposable {
|
||||
checkProposedApiEnabled(extension, 'inlineCompletionsNew');
|
||||
if (provider.handleDidShowCompletionItem && !isProposedApiEnabled(extension, 'inlineCompletionsAdditions')) {
|
||||
throw new Error(`When the method "handleDidShowCompletionItem" is implemented on a provider, the usage of the proposed api 'inlineCompletionsAdditions' must be declared!`);
|
||||
}
|
||||
return extHostLanguageFeatures.registerInlineCompletionsProviderNew(extension, checkSelector(selector), provider);
|
||||
},
|
||||
registerDocumentLinkProvider(selector: vscode.DocumentSelector, provider: vscode.DocumentLinkProvider): vscode.Disposable {
|
||||
return extHostLanguageFeatures.registerDocumentLinkProvider(extension, checkSelector(selector), provider);
|
||||
},
|
||||
@@ -1205,6 +1212,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
InlineValueVariableLookup: extHostTypes.InlineValueVariableLookup,
|
||||
InlineValueEvaluatableExpression: extHostTypes.InlineValueEvaluatableExpression,
|
||||
InlineCompletionTriggerKind: extHostTypes.InlineCompletionTriggerKind,
|
||||
InlineCompletionTriggerKindNew: extHostTypes.InlineCompletionTriggerKindNew,
|
||||
EventEmitter: Emitter,
|
||||
ExtensionKind: extHostTypes.ExtensionKind,
|
||||
ExtensionMode: extHostTypes.ExtensionMode,
|
||||
@@ -1218,7 +1226,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
FoldingRangeKind: extHostTypes.FoldingRangeKind,
|
||||
FunctionBreakpoint: extHostTypes.FunctionBreakpoint,
|
||||
InlineCompletionItem: extHostTypes.InlineSuggestion,
|
||||
InlineCompletionItemNew: extHostTypes.InlineSuggestionNew,
|
||||
InlineCompletionList: extHostTypes.InlineSuggestions,
|
||||
InlineCompletionListNew: extHostTypes.InlineSuggestionsNew,
|
||||
Hover: extHostTypes.Hover,
|
||||
IndentAction: languageConfiguration.IndentAction,
|
||||
Location: extHostTypes.Location,
|
||||
|
||||
Reference in New Issue
Block a user