mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
CompletionItemKindModifier -> CompletionItemKindTag, #23927
This commit is contained in:
@@ -808,7 +808,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
CommentMode: extHostTypes.CommentMode,
|
||||
CompletionItem: extHostTypes.CompletionItem,
|
||||
CompletionItemKind: extHostTypes.CompletionItemKind,
|
||||
CompletionItemKindModifier: extHostTypes.CompletionItemKindModifier,
|
||||
CompletionItemKindTag: extHostTypes.CompletionItemKindTag,
|
||||
CompletionList: extHostTypes.CompletionList,
|
||||
CompletionTriggerKind: extHostTypes.CompletionTriggerKind,
|
||||
ConfigurationTarget: extHostTypes.ConfigurationTarget,
|
||||
|
||||
@@ -935,7 +935,7 @@ export interface ISuggestDataDto {
|
||||
k/* commitCharacters */?: string[];
|
||||
l/* additionalTextEdits */?: ISingleEditOperation[];
|
||||
m/* command */?: modes.Command;
|
||||
n/* kindModifier */?: modes.CompletionItemKindModifier[];
|
||||
n/* kindModifier */?: modes.CompletionItemKindTag[];
|
||||
// not-standard
|
||||
x?: ChainedCacheId;
|
||||
}
|
||||
|
||||
@@ -741,8 +741,8 @@ class SuggestAdapter {
|
||||
|
||||
// kind2
|
||||
if (typeof item.kind2 === 'object') {
|
||||
result.b = typeConvert.CompletionItemKind.from(item.kind2.base);
|
||||
result.n = item.kind2.modifier.map(typeConvert.CompletionItemKindModifier.from);
|
||||
result.b = typeConvert.CompletionItemKind.from(item.kind2.kind);
|
||||
result.n = item.kind2.tags.map(typeConvert.CompletionItemKindTag.from);
|
||||
}
|
||||
|
||||
// 'insertText'-logic
|
||||
|
||||
@@ -682,17 +682,17 @@ export namespace CompletionContext {
|
||||
}
|
||||
}
|
||||
|
||||
export namespace CompletionItemKindModifier {
|
||||
export namespace CompletionItemKindTag {
|
||||
|
||||
export function from(kind: types.CompletionItemKindModifier): modes.CompletionItemKindModifier {
|
||||
export function from(kind: types.CompletionItemKindTag): modes.CompletionItemKindTag {
|
||||
switch (kind) {
|
||||
case types.CompletionItemKindModifier.Deprecated: return modes.CompletionItemKindModifier.Deprecated;
|
||||
case types.CompletionItemKindTag.Deprecated: return modes.CompletionItemKindTag.Deprecated;
|
||||
}
|
||||
}
|
||||
|
||||
export function to(kind: modes.CompletionItemKindModifier): types.CompletionItemKindModifier {
|
||||
export function to(kind: modes.CompletionItemKindTag): types.CompletionItemKindTag {
|
||||
switch (kind) {
|
||||
case modes.CompletionItemKindModifier.Deprecated: return types.CompletionItemKindModifier.Deprecated;
|
||||
case modes.CompletionItemKindTag.Deprecated: return types.CompletionItemKindTag.Deprecated;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1308,7 +1308,7 @@ export enum CompletionItemKind {
|
||||
TypeParameter = 24
|
||||
}
|
||||
|
||||
export enum CompletionItemKindModifier {
|
||||
export enum CompletionItemKindTag {
|
||||
Deprecated = 1,
|
||||
}
|
||||
|
||||
@@ -1317,7 +1317,7 @@ export class CompletionItem implements vscode.CompletionItem {
|
||||
|
||||
label: string;
|
||||
kind?: CompletionItemKind;
|
||||
kind2?: CompletionItemKind | { base: CompletionItemKind, modifier: CompletionItemKindModifier[] };
|
||||
kind2?: CompletionItemKind | { kind: CompletionItemKind, tags: CompletionItemKindTag[] };
|
||||
detail?: string;
|
||||
documentation?: string | MarkdownString;
|
||||
sortText?: string;
|
||||
|
||||
Reference in New Issue
Block a user