actions.rs

  1//! This module contains all actions supported by [`Editor`].
  2use super::*;
  3use gpui::{Action, actions};
  4use project::project_settings::GoToDiagnosticSeverityFilter;
  5use schemars::JsonSchema;
  6use util::serde::default_true;
  7
  8/// Selects the next occurrence of the current selection.
  9#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 10#[action(namespace = editor)]
 11#[serde(deny_unknown_fields)]
 12pub struct SelectNext {
 13    #[serde(default)]
 14    pub replace_newest: bool,
 15}
 16
 17/// Selects the previous occurrence of the current selection.
 18#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 19#[action(namespace = editor)]
 20#[serde(deny_unknown_fields)]
 21pub struct SelectPrevious {
 22    #[serde(default)]
 23    pub replace_newest: bool,
 24}
 25
 26/// Moves the cursor to the beginning of the current line.
 27#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 28#[action(namespace = editor)]
 29#[serde(deny_unknown_fields)]
 30pub struct MoveToBeginningOfLine {
 31    #[serde(default = "default_true")]
 32    pub stop_at_soft_wraps: bool,
 33    #[serde(default)]
 34    pub stop_at_indent: bool,
 35}
 36
 37/// Selects from the cursor to the beginning of the current line.
 38#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 39#[action(namespace = editor)]
 40#[serde(deny_unknown_fields)]
 41pub struct SelectToBeginningOfLine {
 42    #[serde(default)]
 43    pub(super) stop_at_soft_wraps: bool,
 44    #[serde(default)]
 45    pub stop_at_indent: bool,
 46}
 47
 48/// Deletes from the cursor to the beginning of the current line.
 49#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 50#[action(namespace = editor)]
 51#[serde(deny_unknown_fields)]
 52pub struct DeleteToBeginningOfLine {
 53    #[serde(default)]
 54    pub(super) stop_at_indent: bool,
 55}
 56
 57/// Moves the cursor up by one page.
 58#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 59#[action(namespace = editor)]
 60#[serde(deny_unknown_fields)]
 61pub struct MovePageUp {
 62    #[serde(default)]
 63    pub(super) center_cursor: bool,
 64}
 65
 66/// Moves the cursor down by one page.
 67#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 68#[action(namespace = editor)]
 69#[serde(deny_unknown_fields)]
 70pub struct MovePageDown {
 71    #[serde(default)]
 72    pub(super) center_cursor: bool,
 73}
 74
 75/// Moves the cursor to the end of the current line.
 76#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 77#[action(namespace = editor)]
 78#[serde(deny_unknown_fields)]
 79pub struct MoveToEndOfLine {
 80    #[serde(default = "default_true")]
 81    pub stop_at_soft_wraps: bool,
 82}
 83
 84/// Selects from the cursor to the end of the current line.
 85#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 86#[action(namespace = editor)]
 87#[serde(deny_unknown_fields)]
 88pub struct SelectToEndOfLine {
 89    #[serde(default)]
 90    pub(super) stop_at_soft_wraps: bool,
 91}
 92
 93/// Toggles the display of available code actions at the cursor position.
 94#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
 95#[action(namespace = editor)]
 96#[serde(deny_unknown_fields)]
 97pub struct ToggleCodeActions {
 98    // Source from which the action was deployed.
 99    #[serde(default)]
100    #[serde(skip)]
101    pub deployed_from: Option<CodeActionSource>,
102    // Run first available task if there is only one.
103    #[serde(default)]
104    #[serde(skip)]
105    pub quick_launch: bool,
106}
107
108#[derive(PartialEq, Clone, Debug)]
109pub enum CodeActionSource {
110    Indicator(DisplayRow),
111    RunMenu(DisplayRow),
112    QuickActionBar,
113}
114
115/// Confirms and accepts the currently selected completion suggestion.
116#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
117#[action(namespace = editor)]
118#[serde(deny_unknown_fields)]
119pub struct ConfirmCompletion {
120    #[serde(default)]
121    pub item_ix: Option<usize>,
122}
123
124/// Composes multiple completion suggestions into a single completion.
125#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
126#[action(namespace = editor)]
127#[serde(deny_unknown_fields)]
128pub struct ComposeCompletion {
129    #[serde(default)]
130    pub item_ix: Option<usize>,
131}
132
133/// Confirms and applies the currently selected code action.
134#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
135#[action(namespace = editor)]
136#[serde(deny_unknown_fields)]
137pub struct ConfirmCodeAction {
138    #[serde(default)]
139    pub item_ix: Option<usize>,
140}
141
142/// Toggles comment markers for the selected lines.
143#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
144#[action(namespace = editor)]
145#[serde(deny_unknown_fields)]
146pub struct ToggleComments {
147    #[serde(default)]
148    pub advance_downwards: bool,
149    #[serde(default)]
150    pub ignore_indent: bool,
151}
152
153/// Moves the cursor up by a specified number of lines.
154#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
155#[action(namespace = editor)]
156#[serde(deny_unknown_fields)]
157pub struct MoveUpByLines {
158    #[serde(default)]
159    pub(super) lines: u32,
160}
161
162/// Moves the cursor down by a specified number of lines.
163#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
164#[action(namespace = editor)]
165#[serde(deny_unknown_fields)]
166pub struct MoveDownByLines {
167    #[serde(default)]
168    pub(super) lines: u32,
169}
170
171/// Extends selection up by a specified number of lines.
172#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
173#[action(namespace = editor)]
174#[serde(deny_unknown_fields)]
175pub struct SelectUpByLines {
176    #[serde(default)]
177    pub(super) lines: u32,
178}
179
180/// Extends selection down by a specified number of lines.
181#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
182#[action(namespace = editor)]
183#[serde(deny_unknown_fields)]
184pub struct SelectDownByLines {
185    #[serde(default)]
186    pub(super) lines: u32,
187}
188
189/// Expands all excerpts in the editor.
190#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
191#[action(namespace = editor)]
192#[serde(deny_unknown_fields)]
193pub struct ExpandExcerpts {
194    #[serde(default)]
195    pub(super) lines: u32,
196}
197
198/// Expands excerpts above the current position.
199#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
200#[action(namespace = editor)]
201#[serde(deny_unknown_fields)]
202pub struct ExpandExcerptsUp {
203    #[serde(default)]
204    pub(super) lines: u32,
205}
206
207/// Expands excerpts below the current position.
208#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
209#[action(namespace = editor)]
210#[serde(deny_unknown_fields)]
211pub struct ExpandExcerptsDown {
212    #[serde(default)]
213    pub(super) lines: u32,
214}
215
216/// Shows code completion suggestions at the cursor position.
217#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
218#[action(namespace = editor)]
219#[serde(deny_unknown_fields)]
220pub struct ShowCompletions {
221    #[serde(default)]
222    pub(super) trigger: Option<String>,
223}
224
225/// Handles text input in the editor.
226#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
227#[action(namespace = editor)]
228pub struct HandleInput(pub String);
229
230/// Deletes from the cursor to the end of the next word.
231/// Stops before the end of the next word, if whitespace sequences of length >= 2 are encountered.
232#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
233#[action(namespace = editor)]
234#[serde(deny_unknown_fields)]
235pub struct DeleteToNextWordEnd {
236    #[serde(default)]
237    pub ignore_newlines: bool,
238    // Whether to stop before the end of the next word, if language-defined bracket is encountered.
239    #[serde(default)]
240    pub ignore_brackets: bool,
241}
242
243/// Deletes from the cursor to the start of the previous word.
244/// Stops before the start of the previous word, if whitespace sequences of length >= 2 are encountered.
245#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
246#[action(namespace = editor)]
247#[serde(deny_unknown_fields)]
248pub struct DeleteToPreviousWordStart {
249    #[serde(default)]
250    pub ignore_newlines: bool,
251    // Whether to stop before the start of the previous word, if language-defined bracket is encountered.
252    #[serde(default)]
253    pub ignore_brackets: bool,
254}
255
256/// Cuts from cursor to end of line.
257#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
258#[action(namespace = editor)]
259#[serde(deny_unknown_fields)]
260pub struct CutToEndOfLine {
261    #[serde(default)]
262    pub stop_at_newlines: bool,
263}
264
265/// Folds all code blocks at the specified indentation level.
266#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
267#[action(namespace = editor)]
268pub struct FoldAtLevel(pub u32);
269
270/// Spawns the nearest available task from the current cursor position.
271#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
272#[action(namespace = editor)]
273#[serde(deny_unknown_fields)]
274pub struct SpawnNearestTask {
275    #[serde(default)]
276    pub reveal: task::RevealStrategy,
277}
278
279#[derive(Clone, PartialEq, Action)]
280#[action(no_json, no_register)]
281pub struct DiffClipboardWithSelectionData {
282    pub clipboard_text: String,
283    pub editor: Entity<Editor>,
284}
285
286#[derive(Debug, PartialEq, Eq, Clone, Copy, Deserialize, Default)]
287pub enum UuidVersion {
288    #[default]
289    V4,
290    V7,
291}
292
293/// Splits selection into individual lines.
294#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
295#[action(namespace = editor)]
296#[serde(deny_unknown_fields)]
297pub struct SplitSelectionIntoLines {
298    /// Keep the text selected after splitting instead of collapsing to cursors.
299    #[serde(default)]
300    pub keep_selections: bool,
301}
302
303/// Goes to the next diagnostic in the file.
304#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
305#[action(namespace = editor)]
306#[serde(deny_unknown_fields)]
307pub struct GoToDiagnostic {
308    #[serde(default)]
309    pub severity: GoToDiagnosticSeverityFilter,
310}
311
312/// Goes to the previous diagnostic in the file.
313#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
314#[action(namespace = editor)]
315#[serde(deny_unknown_fields)]
316pub struct GoToPreviousDiagnostic {
317    #[serde(default)]
318    pub severity: GoToDiagnosticSeverityFilter,
319}
320
321actions!(
322    debugger,
323    [
324        /// Runs program execution to the current cursor position.
325        RunToCursor,
326        /// Evaluates the selected text in the debugger context.
327        EvaluateSelectedText
328    ]
329);
330
331actions!(
332    go_to_line,
333    [
334        /// Toggles the go to line dialog.
335        #[action(name = "Toggle")]
336        ToggleGoToLine
337    ]
338);
339
340actions!(
341    editor,
342    [
343        /// Accepts the full edit prediction.
344        AcceptEditPrediction,
345        /// Accepts a partial edit prediction.
346        #[action(deprecated_aliases = ["editor::AcceptPartialCopilotSuggestion"])]
347        AcceptPartialEditPrediction,
348        /// Adds a cursor above the current selection.
349        AddSelectionAbove,
350        /// Adds a cursor below the current selection.
351        AddSelectionBelow,
352        /// Applies all diff hunks in the editor.
353        ApplyAllDiffHunks,
354        /// Applies the diff hunk at the current position.
355        ApplyDiffHunk,
356        /// Deletes the character before the cursor.
357        Backspace,
358        /// Shows git blame information for the current line.
359        BlameHover,
360        /// Cancels the current operation.
361        Cancel,
362        /// Cancels the running flycheck operation.
363        CancelFlycheck,
364        /// Cancels pending language server work.
365        CancelLanguageServerWork,
366        /// Clears flycheck results.
367        ClearFlycheck,
368        /// Confirms the rename operation.
369        ConfirmRename,
370        /// Confirms completion by inserting at cursor.
371        ConfirmCompletionInsert,
372        /// Confirms completion by replacing existing text.
373        ConfirmCompletionReplace,
374        /// Navigates to the first item in the context menu.
375        ContextMenuFirst,
376        /// Navigates to the last item in the context menu.
377        ContextMenuLast,
378        /// Navigates to the next item in the context menu.
379        ContextMenuNext,
380        /// Navigates to the previous item in the context menu.
381        ContextMenuPrevious,
382        /// Converts indentation from tabs to spaces.
383        ConvertIndentationToSpaces,
384        /// Converts indentation from spaces to tabs.
385        ConvertIndentationToTabs,
386        /// Converts selected text to kebab-case.
387        ConvertToKebabCase,
388        /// Converts selected text to lowerCamelCase.
389        ConvertToLowerCamelCase,
390        /// Converts selected text to lowercase.
391        ConvertToLowerCase,
392        /// Toggles the case of selected text.
393        ConvertToOppositeCase,
394        /// Converts selected text to sentence case.
395        ConvertToSentenceCase,
396        /// Converts selected text to snake_case.
397        ConvertToSnakeCase,
398        /// Converts selected text to Title Case.
399        ConvertToTitleCase,
400        /// Converts selected text to UpperCamelCase.
401        ConvertToUpperCamelCase,
402        /// Converts selected text to UPPERCASE.
403        ConvertToUpperCase,
404        /// Applies ROT13 cipher to selected text.
405        ConvertToRot13,
406        /// Applies ROT47 cipher to selected text.
407        ConvertToRot47,
408        /// Copies selected text to the clipboard.
409        Copy,
410        /// Copies selected text to the clipboard with leading/trailing whitespace trimmed.
411        CopyAndTrim,
412        /// Copies the current file location to the clipboard.
413        CopyFileLocation,
414        /// Copies the highlighted text as JSON.
415        CopyHighlightJson,
416        /// Copies the current file name to the clipboard.
417        CopyFileName,
418        /// Copies the file name without extension to the clipboard.
419        CopyFileNameWithoutExtension,
420        /// Copies a permalink to the current line.
421        CopyPermalinkToLine,
422        /// Cuts selected text to the clipboard.
423        Cut,
424        /// Deletes the character after the cursor.
425        Delete,
426        /// Deletes the current line.
427        DeleteLine,
428        /// Deletes from cursor to end of line.
429        DeleteToEndOfLine,
430        /// Deletes to the end of the next subword.
431        DeleteToNextSubwordEnd,
432        /// Deletes to the start of the previous subword.
433        DeleteToPreviousSubwordStart,
434        /// Diffs the text stored in the clipboard against the current selection.
435        DiffClipboardWithSelection,
436        /// Displays names of all active cursors.
437        DisplayCursorNames,
438        /// Duplicates the current line below.
439        DuplicateLineDown,
440        /// Duplicates the current line above.
441        DuplicateLineUp,
442        /// Duplicates the current selection.
443        DuplicateSelection,
444        /// Expands all diff hunks in the editor.
445        #[action(deprecated_aliases = ["editor::ExpandAllHunkDiffs"])]
446        ExpandAllDiffHunks,
447        /// Expands macros recursively at cursor position.
448        ExpandMacroRecursively,
449        /// Finds all references to the symbol at cursor.
450        FindAllReferences,
451        /// Finds the next match in the search.
452        FindNextMatch,
453        /// Finds the previous match in the search.
454        FindPreviousMatch,
455        /// Folds the current code block.
456        Fold,
457        /// Folds all foldable regions in the editor.
458        FoldAll,
459        /// Folds all function bodies in the editor.
460        FoldFunctionBodies,
461        /// Folds the current code block and all its children.
462        FoldRecursive,
463        /// Folds the selected ranges.
464        FoldSelectedRanges,
465        /// Toggles focus back to the last active buffer.
466        ToggleFocus,
467        /// Toggles folding at the current position.
468        ToggleFold,
469        /// Toggles recursive folding at the current position.
470        ToggleFoldRecursive,
471        /// Toggles all folds in a buffer or all excerpts in multibuffer.
472        ToggleFoldAll,
473        /// Formats the entire document.
474        Format,
475        /// Formats only the selected text.
476        FormatSelections,
477        /// Goes to the declaration of the symbol at cursor.
478        GoToDeclaration,
479        /// Goes to declaration in a split pane.
480        GoToDeclarationSplit,
481        /// Goes to the definition of the symbol at cursor.
482        GoToDefinition,
483        /// Goes to definition in a split pane.
484        GoToDefinitionSplit,
485        /// Goes to the next diff hunk.
486        GoToHunk,
487        /// Goes to the previous diff hunk.
488        GoToPreviousHunk,
489        /// Goes to the implementation of the symbol at cursor.
490        GoToImplementation,
491        /// Goes to implementation in a split pane.
492        GoToImplementationSplit,
493        /// Goes to the next change in the file.
494        GoToNextChange,
495        /// Goes to the parent module of the current file.
496        GoToParentModule,
497        /// Goes to the previous change in the file.
498        GoToPreviousChange,
499        /// Goes to the type definition of the symbol at cursor.
500        GoToTypeDefinition,
501        /// Goes to type definition in a split pane.
502        GoToTypeDefinitionSplit,
503        /// Goes to the next document highlight.
504        GoToNextDocumentHighlight,
505        /// Goes to the previous document highlight.
506        GoToPreviousDocumentHighlight,
507        /// Scrolls down by half a page.
508        HalfPageDown,
509        /// Scrolls up by half a page.
510        HalfPageUp,
511        /// Shows hover information for the symbol at cursor.
512        Hover,
513        /// Increases indentation of selected lines.
514        Indent,
515        /// Inserts a UUID v4 at cursor position.
516        InsertUuidV4,
517        /// Inserts a UUID v7 at cursor position.
518        InsertUuidV7,
519        /// Joins the current line with the next line.
520        JoinLines,
521        /// Cuts to kill ring (Emacs-style).
522        KillRingCut,
523        /// Yanks from kill ring (Emacs-style).
524        KillRingYank,
525        /// Moves cursor down one line.
526        LineDown,
527        /// Moves cursor up one line.
528        LineUp,
529        /// Moves cursor down.
530        MoveDown,
531        /// Moves cursor left.
532        MoveLeft,
533        /// Moves the current line down.
534        MoveLineDown,
535        /// Moves the current line up.
536        MoveLineUp,
537        /// Moves cursor right.
538        MoveRight,
539        /// Moves cursor to the beginning of the document.
540        MoveToBeginning,
541        /// Moves cursor to the enclosing bracket.
542        MoveToEnclosingBracket,
543        /// Moves cursor to the end of the document.
544        MoveToEnd,
545        /// Moves cursor to the end of the paragraph.
546        MoveToEndOfParagraph,
547        /// Moves cursor to the end of the next subword.
548        MoveToNextSubwordEnd,
549        /// Moves cursor to the end of the next word.
550        MoveToNextWordEnd,
551        /// Moves cursor to the start of the previous subword.
552        MoveToPreviousSubwordStart,
553        /// Moves cursor to the start of the previous word.
554        MoveToPreviousWordStart,
555        /// Moves cursor to the start of the paragraph.
556        MoveToStartOfParagraph,
557        /// Moves cursor to the start of the current excerpt.
558        MoveToStartOfExcerpt,
559        /// Moves cursor to the start of the next excerpt.
560        MoveToStartOfNextExcerpt,
561        /// Moves cursor to the end of the current excerpt.
562        MoveToEndOfExcerpt,
563        /// Moves cursor to the end of the previous excerpt.
564        MoveToEndOfPreviousExcerpt,
565        /// Moves cursor up.
566        MoveUp,
567        /// Inserts a new line and moves cursor to it.
568        Newline,
569        /// Inserts a new line above the current line.
570        NewlineAbove,
571        /// Inserts a new line below the current line.
572        NewlineBelow,
573        /// Navigates to the next edit prediction.
574        NextEditPrediction,
575        /// Scrolls to the next screen.
576        NextScreen,
577        /// Opens the context menu at cursor position.
578        OpenContextMenu,
579        /// Opens excerpts from the current file.
580        OpenExcerpts,
581        /// Opens excerpts in a split pane.
582        OpenExcerptsSplit,
583        /// Opens the proposed changes editor.
584        OpenProposedChangesEditor,
585        /// Opens documentation for the symbol at cursor.
586        OpenDocs,
587        /// Opens a permalink to the current line.
588        OpenPermalinkToLine,
589        /// Opens the file whose name is selected in the editor.
590        #[action(deprecated_aliases = ["editor::OpenFile"])]
591        OpenSelectedFilename,
592        /// Opens all selections in a multibuffer.
593        OpenSelectionsInMultibuffer,
594        /// Opens the URL at cursor position.
595        OpenUrl,
596        /// Organizes import statements.
597        OrganizeImports,
598        /// Decreases indentation of selected lines.
599        Outdent,
600        /// Automatically adjusts indentation based on context.
601        AutoIndent,
602        /// Scrolls down by one page.
603        PageDown,
604        /// Scrolls up by one page.
605        PageUp,
606        /// Pastes from clipboard.
607        Paste,
608        /// Navigates to the previous edit prediction.
609        PreviousEditPrediction,
610        /// Redoes the last undone edit.
611        Redo,
612        /// Redoes the last selection change.
613        RedoSelection,
614        /// Renames the symbol at cursor.
615        Rename,
616        /// Restarts the language server for the current file.
617        RestartLanguageServer,
618        /// Reveals the current file in the system file manager.
619        RevealInFileManager,
620        /// Reverses the order of selected lines.
621        ReverseLines,
622        /// Reloads the file from disk.
623        ReloadFile,
624        /// Rewraps text to fit within the preferred line length.
625        Rewrap,
626        /// Runs flycheck diagnostics.
627        RunFlycheck,
628        /// Scrolls the cursor to the bottom of the viewport.
629        ScrollCursorBottom,
630        /// Scrolls the cursor to the center of the viewport.
631        ScrollCursorCenter,
632        /// Cycles cursor position between center, top, and bottom.
633        ScrollCursorCenterTopBottom,
634        /// Scrolls the cursor to the top of the viewport.
635        ScrollCursorTop,
636        /// Selects all text in the editor.
637        SelectAll,
638        /// Selects all matches of the current selection.
639        SelectAllMatches,
640        /// Selects to the start of the current excerpt.
641        SelectToStartOfExcerpt,
642        /// Selects to the start of the next excerpt.
643        SelectToStartOfNextExcerpt,
644        /// Selects to the end of the current excerpt.
645        SelectToEndOfExcerpt,
646        /// Selects to the end of the previous excerpt.
647        SelectToEndOfPreviousExcerpt,
648        /// Extends selection down.
649        SelectDown,
650        /// Selects the enclosing symbol.
651        SelectEnclosingSymbol,
652        /// Selects the next larger syntax node.
653        SelectLargerSyntaxNode,
654        /// Selects the next syntax node sibling.
655        SelectNextSyntaxNode,
656        /// Selects the previous syntax node sibling.
657        SelectPreviousSyntaxNode,
658        /// Extends selection left.
659        SelectLeft,
660        /// Selects the current line.
661        SelectLine,
662        /// Extends selection down by one page.
663        SelectPageDown,
664        /// Extends selection up by one page.
665        SelectPageUp,
666        /// Extends selection right.
667        SelectRight,
668        /// Selects the next smaller syntax node.
669        SelectSmallerSyntaxNode,
670        /// Selects to the beginning of the document.
671        SelectToBeginning,
672        /// Selects to the end of the document.
673        SelectToEnd,
674        /// Selects to the end of the paragraph.
675        SelectToEndOfParagraph,
676        /// Selects to the end of the next subword.
677        SelectToNextSubwordEnd,
678        /// Selects to the end of the next word.
679        SelectToNextWordEnd,
680        /// Selects to the start of the previous subword.
681        SelectToPreviousSubwordStart,
682        /// Selects to the start of the previous word.
683        SelectToPreviousWordStart,
684        /// Selects to the start of the paragraph.
685        SelectToStartOfParagraph,
686        /// Extends selection up.
687        SelectUp,
688        /// Shows the system character palette.
689        ShowCharacterPalette,
690        /// Shows edit prediction at cursor.
691        ShowEditPrediction,
692        /// Shows signature help for the current function.
693        ShowSignatureHelp,
694        /// Shows word completions.
695        ShowWordCompletions,
696        /// Randomly shuffles selected lines.
697        ShuffleLines,
698        /// Navigates to the next signature in the signature help popup.
699        SignatureHelpNext,
700        /// Navigates to the previous signature in the signature help popup.
701        SignatureHelpPrevious,
702        /// Sorts selected lines by length.
703        SortLinesByLength,
704        /// Sorts selected lines case-insensitively.
705        SortLinesCaseInsensitive,
706        /// Sorts selected lines case-sensitively.
707        SortLinesCaseSensitive,
708        /// Stops the language server for the current file.
709        StopLanguageServer,
710        /// Switches between source and header files.
711        SwitchSourceHeader,
712        /// Inserts a tab character or indents.
713        Tab,
714        /// Removes a tab character or outdents.
715        Backtab,
716        /// Toggles a breakpoint at the current line.
717        ToggleBreakpoint,
718        /// Toggles the case of selected text.
719        ToggleCase,
720        /// Disables the breakpoint at the current line.
721        DisableBreakpoint,
722        /// Enables the breakpoint at the current line.
723        EnableBreakpoint,
724        /// Edits the log message for a breakpoint.
725        EditLogBreakpoint,
726        /// Toggles automatic signature help.
727        ToggleAutoSignatureHelp,
728        /// Toggles inline git blame display.
729        ToggleGitBlameInline,
730        /// Opens the git commit for the blame at cursor.
731        OpenGitBlameCommit,
732        /// Toggles the diagnostics panel.
733        ToggleDiagnostics,
734        /// Toggles indent guides display.
735        ToggleIndentGuides,
736        /// Toggles inlay hints display.
737        ToggleInlayHints,
738        /// Toggles inline values display.
739        ToggleInlineValues,
740        /// Toggles inline diagnostics display.
741        ToggleInlineDiagnostics,
742        /// Toggles edit prediction feature.
743        ToggleEditPrediction,
744        /// Toggles line numbers display.
745        ToggleLineNumbers,
746        /// Toggles the minimap display.
747        ToggleMinimap,
748        /// Swaps the start and end of the current selection.
749        SwapSelectionEnds,
750        /// Sets a mark at the current position.
751        SetMark,
752        /// Toggles relative line numbers display.
753        ToggleRelativeLineNumbers,
754        /// Toggles diff display for selected hunks.
755        #[action(deprecated_aliases = ["editor::ToggleHunkDiff"])]
756        ToggleSelectedDiffHunks,
757        /// Toggles the selection menu.
758        ToggleSelectionMenu,
759        /// Toggles soft wrap mode.
760        ToggleSoftWrap,
761        /// Toggles the tab bar display.
762        ToggleTabBar,
763        /// Transposes characters around cursor.
764        Transpose,
765        /// Undoes the last edit.
766        Undo,
767        /// Undoes the last selection change.
768        UndoSelection,
769        /// Unfolds all folded regions.
770        UnfoldAll,
771        /// Unfolds lines at cursor.
772        UnfoldLines,
773        /// Unfolds recursively at cursor.
774        UnfoldRecursive,
775        /// Removes duplicate lines (case-insensitive).
776        UniqueLinesCaseInsensitive,
777        /// Removes duplicate lines (case-sensitive).
778        UniqueLinesCaseSensitive,
779        /// Removes the surrounding syntax node (for example brackets, or closures)
780        /// from the current selections.
781        UnwrapSyntaxNode,
782        /// Wraps selections in tag specified by language.
783        WrapSelectionsInTag
784    ]
785);