-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Closed
Labels
apieditor-code-actionsEditor inplace actions (Ctrl + .)Editor inplace actions (Ctrl + .)feature-requestRequest for new features or functionalityRequest for new features or functionality
Description
Part of #33555
Problems
Extensions currently do not know how a code actions request was triggered. Code actions may be requested automatically by vscode or when the user requests them
Proposal
Add a trigger
type to CodeActionContext
:
export interface CodeActionContext {
readonly diagnostics: Diagnostic[];
readonly trigger: 'auto' | 'manual';
}
auto
: Code actions requested by VS Code automaticallymanual
: Code actions requested by user / command
Extensions could use this to determine which code actions they want to compute / show. For example, an extension may decide to only compute refactorings when a user requests them
// @jrieken
Metadata
Metadata
Assignees
Labels
apieditor-code-actionsEditor inplace actions (Ctrl + .)Editor inplace actions (Ctrl + .)feature-requestRequest for new features or functionalityRequest for new features or functionality