mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 21:39:43 +00:00
rename suggestions: add trigger-kind to proposed API
This commit is contained in:
parent
e592670f3b
commit
abc8279c11
|
@ -9,6 +9,7 @@ import { Codicon } from 'vs/base/common/codicons';
|
|||
import { Color } from 'vs/base/common/color';
|
||||
import { IReadonlyVSDataTransfer } from 'vs/base/common/dataTransfer';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { HierarchicalKind } from 'vs/base/common/hierarchicalKind';
|
||||
import { IMarkdownString } from 'vs/base/common/htmlContent';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ThemeIcon } from 'vs/base/common/themables';
|
||||
|
@ -18,14 +19,13 @@ import { IPosition, Position } from 'vs/editor/common/core/position';
|
|||
import { IRange, Range } from 'vs/editor/common/core/range';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import { LanguageId } from 'vs/editor/common/encodedTokenAttributes';
|
||||
import { LanguageFilter } from 'vs/editor/common/languageSelector';
|
||||
import * as model from 'vs/editor/common/model';
|
||||
import { TokenizationRegistry as TokenizationRegistryImpl } from 'vs/editor/common/tokenizationRegistry';
|
||||
import { ContiguousMultilineTokens } from 'vs/editor/common/tokens/contiguousMultilineTokens';
|
||||
import { localize } from 'vs/nls';
|
||||
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
|
||||
import { IMarkerData } from 'vs/platform/markers/common/markers';
|
||||
import { LanguageFilter } from 'vs/editor/common/languageSelector';
|
||||
import { HierarchicalKind } from 'vs/base/common/hierarchicalKind';
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
@ -1729,13 +1729,18 @@ export enum NewSymbolNameTag {
|
|||
AIGenerated = 1
|
||||
}
|
||||
|
||||
export enum NewSymbolNameTriggerKind {
|
||||
Invoke = 0,
|
||||
Automatic = 1,
|
||||
}
|
||||
|
||||
export interface NewSymbolName {
|
||||
readonly newSymbolName: string;
|
||||
readonly tags?: readonly NewSymbolNameTag[];
|
||||
}
|
||||
|
||||
export interface NewSymbolNamesProvider {
|
||||
provideNewSymbolNames(model: model.ITextModel, range: IRange, token: CancellationToken): ProviderResult<NewSymbolName[]>;
|
||||
provideNewSymbolNames(model: model.ITextModel, range: IRange, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
|
|
|
@ -732,6 +732,11 @@ export enum NewSymbolNameTag {
|
|||
AIGenerated = 1
|
||||
}
|
||||
|
||||
export enum NewSymbolNameTriggerKind {
|
||||
Invoke = 0,
|
||||
Automatic = 1
|
||||
}
|
||||
|
||||
/**
|
||||
* A positioning preference for rendering overlay widgets.
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@ import { Range } from 'vs/editor/common/core/range';
|
|||
import { IEditorContribution } from 'vs/editor/common/editorCommon';
|
||||
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
|
||||
import { LanguageFeatureRegistry } from 'vs/editor/common/languageFeatureRegistry';
|
||||
import { Rejection, RenameLocation, RenameProvider, WorkspaceEdit } from 'vs/editor/common/languages';
|
||||
import { NewSymbolNameTriggerKind, Rejection, RenameLocation, RenameProvider, WorkspaceEdit } from 'vs/editor/common/languages';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures';
|
||||
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration';
|
||||
|
@ -231,7 +231,7 @@ class RenameController implements IEditorContribution {
|
|||
|
||||
const newSymbolNamesProviders = this._languageFeaturesService.newSymbolNamesProvider.all(model);
|
||||
|
||||
const requestRenameSuggestions = (cts: CancellationToken) => newSymbolNamesProviders.map(p => p.provideNewSymbolNames(model, loc.range, cts));
|
||||
const requestRenameSuggestions = (triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => newSymbolNamesProviders.map(p => p.provideNewSymbolNames(model, loc.range, triggerKind, cts));
|
||||
|
||||
trace('creating rename input field and awaiting its result');
|
||||
const supportPreview = this._bulkEditService.hasPreviewHandler() && this._configService.getValue<boolean>(this.editor.getModel().uri, 'editor.rename.enablePreview');
|
||||
|
|
|
@ -27,7 +27,7 @@ import { IDimension } from 'vs/editor/common/core/dimension';
|
|||
import { Position } from 'vs/editor/common/core/position';
|
||||
import { IRange, Range } from 'vs/editor/common/core/range';
|
||||
import { ScrollType } from 'vs/editor/common/editorCommon';
|
||||
import { NewSymbolName, NewSymbolNameTag, ProviderResult } from 'vs/editor/common/languages';
|
||||
import { NewSymbolName, NewSymbolNameTag, NewSymbolNameTriggerKind, ProviderResult } from 'vs/editor/common/languages';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IContextKey, IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
|
@ -91,7 +91,7 @@ interface IRenameWidget {
|
|||
where: IRange,
|
||||
currentName: string,
|
||||
supportPreview: boolean,
|
||||
requestRenameSuggestions: (cts: CancellationToken) => ProviderResult<NewSymbolName[]>[],
|
||||
requestRenameSuggestions: (triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => ProviderResult<NewSymbolName[]>[],
|
||||
cts: CancellationTokenSource
|
||||
): Promise<RenameWidgetResult | boolean>;
|
||||
|
||||
|
@ -341,7 +341,7 @@ export class RenameWidget implements IRenameWidget, IContentWidget, IDisposable
|
|||
|
||||
private _currentAcceptInput?: (wantsPreview: boolean) => void;
|
||||
private _currentCancelInput?: (focusEditor: boolean) => void;
|
||||
private _requestRenameCandidatesOnce?: (cts: CancellationToken) => ProviderResult<NewSymbolName[]>[];
|
||||
private _requestRenameCandidatesOnce?: (triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => ProviderResult<NewSymbolName[]>[];
|
||||
|
||||
acceptInput(wantsPreview: boolean): void {
|
||||
this._trace(`invoking acceptInput`);
|
||||
|
@ -369,7 +369,7 @@ export class RenameWidget implements IRenameWidget, IContentWidget, IDisposable
|
|||
where: IRange,
|
||||
currentName: string,
|
||||
supportPreview: boolean,
|
||||
requestRenameCandidates: undefined | ((cts: CancellationToken) => ProviderResult<NewSymbolName[]>[]),
|
||||
requestRenameCandidates: undefined | ((triggerKind: NewSymbolNameTriggerKind, cts: CancellationToken) => ProviderResult<NewSymbolName[]>[]),
|
||||
cts: CancellationTokenSource
|
||||
): Promise<RenameWidgetResult | boolean> {
|
||||
|
||||
|
@ -510,10 +510,15 @@ export class RenameWidget implements IRenameWidget, IContentWidget, IDisposable
|
|||
if (this._renameCandidateProvidersCts !== undefined) {
|
||||
this._renameCandidateProvidersCts.dispose(true);
|
||||
}
|
||||
|
||||
assertType(this._renameCts);
|
||||
|
||||
if (this._inputWithButton.buttonState !== 'stop') {
|
||||
|
||||
this._renameCandidateProvidersCts = new CancellationTokenSource();
|
||||
const candidates = this._requestRenameCandidatesOnce(this._renameCandidateProvidersCts.token);
|
||||
|
||||
const triggerKind = isManuallyTriggered ? NewSymbolNameTriggerKind.Invoke : NewSymbolNameTriggerKind.Automatic;
|
||||
const candidates = this._requestRenameCandidatesOnce(triggerKind, this._renameCandidateProvidersCts.token);
|
||||
|
||||
const window = dom.getActiveWindow();
|
||||
|
||||
|
|
|
@ -8,23 +8,23 @@ import { Color } from 'vs/base/common/color';
|
|||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Position } from 'vs/editor/common/core/position';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import * as model from 'vs/editor/common/model';
|
||||
import { MetadataConsts } from 'vs/editor/common/encodedTokenAttributes';
|
||||
import * as languages from 'vs/editor/common/languages';
|
||||
import { ILanguageExtensionPoint, ILanguageService } from 'vs/editor/common/languages/language';
|
||||
import { LanguageConfiguration } from 'vs/editor/common/languages/languageConfiguration';
|
||||
import { ILanguageConfigurationService } from 'vs/editor/common/languages/languageConfigurationRegistry';
|
||||
import { ModesRegistry } from 'vs/editor/common/languages/modesRegistry';
|
||||
import { ILanguageExtensionPoint, ILanguageService } from 'vs/editor/common/languages/language';
|
||||
import { LanguageSelector } from 'vs/editor/common/languageSelector';
|
||||
import * as model from 'vs/editor/common/model';
|
||||
import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures';
|
||||
import * as standaloneEnums from 'vs/editor/common/standalone/standaloneEnums';
|
||||
import { StandaloneServices } from 'vs/editor/standalone/browser/standaloneServices';
|
||||
import { compile } from 'vs/editor/standalone/common/monarch/monarchCompile';
|
||||
import { MonarchTokenizer } from 'vs/editor/standalone/common/monarch/monarchLexer';
|
||||
import { IMonarchLanguage } from 'vs/editor/standalone/common/monarch/monarchTypes';
|
||||
import { IStandaloneThemeService } from 'vs/editor/standalone/common/standaloneTheme';
|
||||
import { IMarkerData, IMarkerService } from 'vs/platform/markers/common/markers';
|
||||
import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeatures';
|
||||
import { LanguageSelector } from 'vs/editor/common/languageSelector';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { MetadataConsts } from 'vs/editor/common/encodedTokenAttributes';
|
||||
import { IMarkerData, IMarkerService } from 'vs/platform/markers/common/markers';
|
||||
|
||||
/**
|
||||
* Register information about a new language.
|
||||
|
@ -809,6 +809,7 @@ export function createMonacoLanguagesAPI(): typeof monaco.languages {
|
|||
InlineEditTriggerKind: standaloneEnums.InlineEditTriggerKind,
|
||||
CodeActionTriggerType: standaloneEnums.CodeActionTriggerType,
|
||||
NewSymbolNameTag: standaloneEnums.NewSymbolNameTag,
|
||||
NewSymbolNameTriggerKind: standaloneEnums.NewSymbolNameTriggerKind,
|
||||
PartialAcceptTriggerKind: standaloneEnums.PartialAcceptTriggerKind,
|
||||
HoverVerbosityAction: standaloneEnums.HoverVerbosityAction,
|
||||
|
||||
|
|
7
src/vs/monaco.d.ts
vendored
7
src/vs/monaco.d.ts
vendored
|
@ -7892,13 +7892,18 @@ declare namespace monaco.languages {
|
|||
AIGenerated = 1
|
||||
}
|
||||
|
||||
export enum NewSymbolNameTriggerKind {
|
||||
Invoke = 0,
|
||||
Automatic = 1
|
||||
}
|
||||
|
||||
export interface NewSymbolName {
|
||||
readonly newSymbolName: string;
|
||||
readonly tags?: readonly NewSymbolNameTag[];
|
||||
}
|
||||
|
||||
export interface NewSymbolNamesProvider {
|
||||
provideNewSymbolNames(model: editor.ITextModel, range: IRange, token: CancellationToken): ProviderResult<NewSymbolName[]>;
|
||||
provideNewSymbolNames(model: editor.ITextModel, range: IRange, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;
|
||||
}
|
||||
|
||||
export interface Command {
|
||||
|
|
|
@ -3,18 +3,21 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
|
||||
import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { createStringDataTransferItem, IReadonlyVSDataTransfer, VSDataTransfer } from 'vs/base/common/dataTransfer';
|
||||
import { CancellationError } from 'vs/base/common/errors';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { HierarchicalKind } from 'vs/base/common/hierarchicalKind';
|
||||
import { combinedDisposable, Disposable, DisposableMap, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ResourceMap } from 'vs/base/common/map';
|
||||
import { revive } from 'vs/base/common/marshalling';
|
||||
import { mixin } from 'vs/base/common/objects';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { ISingleEditOperation } from 'vs/editor/common/core/editOperation';
|
||||
import { IPosition, Position as EditorPosition } from 'vs/editor/common/core/position';
|
||||
import { IRange, Range as EditorRange } from 'vs/editor/common/core/range';
|
||||
import { Position as EditorPosition, IPosition } from 'vs/editor/common/core/position';
|
||||
import { Range as EditorRange, IRange } from 'vs/editor/common/core/range';
|
||||
import { Selection } from 'vs/editor/common/core/selection';
|
||||
import * as languages from 'vs/editor/common/languages';
|
||||
import { ILanguageService } from 'vs/editor/common/languages/language';
|
||||
|
@ -33,9 +36,6 @@ import * as search from 'vs/workbench/contrib/search/common/search';
|
|||
import * as typeh from 'vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
|
||||
import { extHostNamedCustomer, IExtHostContext } from 'vs/workbench/services/extensions/common/extHostCustomers';
|
||||
import { ExtHostContext, ExtHostLanguageFeaturesShape, HoverWithId, ICallHierarchyItemDto, ICodeActionDto, ICodeActionProviderMetadataDto, IdentifiableInlineCompletion, IdentifiableInlineCompletions, IdentifiableInlineEdit, IDocumentDropEditDto, IDocumentDropEditProviderMetadata, IDocumentFilterDto, IIndentationRuleDto, IInlayHintDto, ILanguageConfigurationDto, ILanguageWordDefinitionDto, ILinkDto, ILocationDto, ILocationLinkDto, IOnEnterRuleDto, IPasteEditDto, IPasteEditProviderMetadataDto, IRegExpDto, ISignatureHelpProviderMetadataDto, ISuggestDataDto, ISuggestDataDtoField, ISuggestResultDtoField, ITypeHierarchyItemDto, IWorkspaceSymbolDto, MainContext, MainThreadLanguageFeaturesShape } from '../common/extHost.protocol';
|
||||
import { ResourceMap } from 'vs/base/common/map';
|
||||
import { isFalsyOrEmpty } from 'vs/base/common/arrays';
|
||||
import { HierarchicalKind } from 'vs/base/common/hierarchicalKind';
|
||||
|
||||
@extHostNamedCustomer(MainContext.MainThreadLanguageFeatures)
|
||||
export class MainThreadLanguageFeatures extends Disposable implements MainThreadLanguageFeaturesShape {
|
||||
|
@ -505,8 +505,8 @@ export class MainThreadLanguageFeatures extends Disposable implements MainThread
|
|||
|
||||
$registerNewSymbolNamesProvider(handle: number, selector: IDocumentFilterDto[]): void {
|
||||
this._registrations.set(handle, this._languageFeaturesService.newSymbolNamesProvider.register(selector, {
|
||||
provideNewSymbolNames: (model: ITextModel, range: IRange, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined> => {
|
||||
return this._proxy.$provideNewSymbolNames(handle, model.uri, range, token);
|
||||
provideNewSymbolNames: (model: ITextModel, range: IRange, triggerKind: languages.NewSymbolNameTriggerKind, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined> => {
|
||||
return this._proxy.$provideNewSymbolNames(handle, model.uri, range, triggerKind, token);
|
||||
}
|
||||
} satisfies languages.NewSymbolNamesProvider));
|
||||
}
|
||||
|
|
|
@ -1721,6 +1721,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
LanguageModelError: extHostTypes.LanguageModelError,
|
||||
NewSymbolName: extHostTypes.NewSymbolName,
|
||||
NewSymbolNameTag: extHostTypes.NewSymbolNameTag,
|
||||
NewSymbolNameTriggerKind: extHostTypes.NewSymbolNameTriggerKind,
|
||||
InlineEdit: extHostTypes.InlineEdit,
|
||||
InlineEditTriggerKind: extHostTypes.InlineEditTriggerKind,
|
||||
};
|
||||
|
|
|
@ -2142,7 +2142,7 @@ export interface ExtHostLanguageFeaturesShape {
|
|||
$releaseWorkspaceSymbols(handle: number, id: number): void;
|
||||
$provideRenameEdits(handle: number, resource: UriComponents, position: IPosition, newName: string, token: CancellationToken): Promise<IWorkspaceEditDto & { rejectReason?: string } | undefined>;
|
||||
$resolveRenameLocation(handle: number, resource: UriComponents, position: IPosition, token: CancellationToken): Promise<languages.RenameLocation | undefined>;
|
||||
$provideNewSymbolNames(handle: number, resource: UriComponents, range: IRange, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined>;
|
||||
$provideNewSymbolNames(handle: number, resource: UriComponents, range: IRange, triggerKind: languages.NewSymbolNameTriggerKind, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined>;
|
||||
$provideDocumentSemanticTokens(handle: number, resource: UriComponents, previousResultId: number, token: CancellationToken): Promise<VSBuffer | null>;
|
||||
$releaseDocumentSemanticTokens(handle: number, semanticColoringResultId: number): void;
|
||||
$provideDocumentRangeSemanticTokens(handle: number, resource: UriComponents, range: IRange, token: CancellationToken): Promise<VSBuffer | null>;
|
||||
|
|
|
@ -32,7 +32,7 @@ import { ExtHostDiagnostics } from 'vs/workbench/api/common/extHostDiagnostics';
|
|||
import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments';
|
||||
import { ExtHostTelemetry, IExtHostTelemetry } from 'vs/workbench/api/common/extHostTelemetry';
|
||||
import * as typeConvert from 'vs/workbench/api/common/extHostTypeConverters';
|
||||
import { CodeActionKind, CompletionList, Disposable, DocumentDropOrPasteEditKind, DocumentSymbol, InlineCompletionTriggerKind, InlineEditTriggerKind, InternalDataTransferItem, Location, Range, SemanticTokens, SemanticTokensEdit, SemanticTokensEdits, SnippetString, SymbolInformation, SyntaxTokenType } from 'vs/workbench/api/common/extHostTypes';
|
||||
import { CodeActionKind, CompletionList, Disposable, DocumentDropOrPasteEditKind, DocumentSymbol, InlineCompletionTriggerKind, InlineEditTriggerKind, InternalDataTransferItem, Location, NewSymbolNameTriggerKind, Range, SemanticTokens, SemanticTokensEdit, SemanticTokensEdits, SnippetString, SymbolInformation, SyntaxTokenType } from 'vs/workbench/api/common/extHostTypes';
|
||||
import { isProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import type * as vscode from 'vscode';
|
||||
import { Cache } from './cache';
|
||||
|
@ -869,19 +869,25 @@ class RenameAdapter {
|
|||
|
||||
class NewSymbolNamesAdapter {
|
||||
|
||||
private static languageTriggerKindToVSCodeTriggerKind: Record<languages.NewSymbolNameTriggerKind, vscode.NewSymbolNameTriggerKind> = {
|
||||
[languages.NewSymbolNameTriggerKind.Invoke]: NewSymbolNameTriggerKind.Invoke,
|
||||
[languages.NewSymbolNameTriggerKind.Automatic]: NewSymbolNameTriggerKind.Automatic,
|
||||
};
|
||||
|
||||
constructor(
|
||||
private readonly _documents: ExtHostDocuments,
|
||||
private readonly _provider: vscode.NewSymbolNamesProvider,
|
||||
private readonly _logService: ILogService
|
||||
) { }
|
||||
|
||||
async provideNewSymbolNames(resource: URI, range: IRange, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined> {
|
||||
async provideNewSymbolNames(resource: URI, range: IRange, triggerKind: languages.NewSymbolNameTriggerKind, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined> {
|
||||
|
||||
const doc = this._documents.getDocument(resource);
|
||||
const pos = typeConvert.Range.to(range);
|
||||
|
||||
try {
|
||||
const value = await this._provider.provideNewSymbolNames(doc, pos, token);
|
||||
const kind = NewSymbolNamesAdapter.languageTriggerKindToVSCodeTriggerKind[triggerKind];
|
||||
const value = await this._provider.provideNewSymbolNames(doc, pos, kind, token);
|
||||
if (!value) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -2483,8 +2489,8 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
|||
return this._createDisposable(handle);
|
||||
}
|
||||
|
||||
$provideNewSymbolNames(handle: number, resource: UriComponents, range: IRange, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined> {
|
||||
return this._withAdapter(handle, NewSymbolNamesAdapter, adapter => adapter.provideNewSymbolNames(URI.revive(resource), range, token), undefined, token);
|
||||
$provideNewSymbolNames(handle: number, resource: UriComponents, range: IRange, triggerKind: languages.NewSymbolNameTriggerKind, token: CancellationToken): Promise<languages.NewSymbolName[] | undefined> {
|
||||
return this._withAdapter(handle, NewSymbolNamesAdapter, adapter => adapter.provideNewSymbolNames(URI.revive(resource), range, triggerKind, token), undefined, token);
|
||||
}
|
||||
|
||||
//#region semantic coloring
|
||||
|
|
|
@ -3180,6 +3180,11 @@ export enum NewSymbolNameTag {
|
|||
AIGenerated = 1
|
||||
}
|
||||
|
||||
export enum NewSymbolNameTriggerKind {
|
||||
Invoke = 0,
|
||||
Automatic = 1,
|
||||
}
|
||||
|
||||
export class NewSymbolName implements vscode.NewSymbolName {
|
||||
readonly newSymbolName: string;
|
||||
readonly tags?: readonly vscode.NewSymbolNameTag[] | undefined;
|
||||
|
|
|
@ -11,6 +11,11 @@ declare module 'vscode' {
|
|||
AIGenerated = 1
|
||||
}
|
||||
|
||||
export enum NewSymbolNameTriggerKind {
|
||||
Invoke = 0,
|
||||
Automatic = 1,
|
||||
}
|
||||
|
||||
export class NewSymbolName {
|
||||
readonly newSymbolName: string;
|
||||
readonly tags?: readonly NewSymbolNameTag[];
|
||||
|
@ -27,7 +32,7 @@ declare module 'vscode' {
|
|||
* @param token A cancellation token.
|
||||
* @return A list of new symbol names.
|
||||
*/
|
||||
provideNewSymbolNames(document: TextDocument, range: Range, token: CancellationToken): ProviderResult<NewSymbolName[]>;
|
||||
provideNewSymbolNames(document: TextDocument, range: Range, triggerKind: NewSymbolNameTriggerKind, token: CancellationToken): ProviderResult<NewSymbolName[]>;
|
||||
}
|
||||
|
||||
export namespace languages {
|
||||
|
|
Loading…
Reference in a new issue