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
321/// Adds a cursor above the current selection.
322#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
323#[action(namespace = editor)]
324#[serde(deny_unknown_fields)]
325pub struct AddSelectionAbove {
326    #[serde(default = "default_true")]
327    pub skip_soft_wrap: bool,
328}
329
330/// Adds a cursor below the current selection.
331#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
332#[action(namespace = editor)]
333#[serde(deny_unknown_fields)]
334pub struct AddSelectionBelow {
335    #[serde(default = "default_true")]
336    pub skip_soft_wrap: bool,
337}
338
339actions!(
340    debugger,
341    [
342        /// Runs program execution to the current cursor position.
343        RunToCursor,
344        /// Evaluates the selected text in the debugger context.
345        EvaluateSelectedText
346    ]
347);
348
349actions!(
350    go_to_line,
351    [
352        /// Toggles the go to line dialog.
353        #[action(name = "Toggle")]
354        ToggleGoToLine
355    ]
356);
357
358actions!(
359    editor,
360    [
361        /// Accepts the full edit prediction.
362        AcceptEditPrediction,
363        /// Accepts a partial edit prediction.
364        #[action(deprecated_aliases = ["editor::AcceptPartialCopilotSuggestion"])]
365        AcceptPartialEditPrediction,
366        /// Applies all diff hunks in the editor.
367        ApplyAllDiffHunks,
368        /// Applies the diff hunk at the current position.
369        ApplyDiffHunk,
370        /// Deletes the character before the cursor.
371        Backspace,
372        /// Shows git blame information for the current line.
373        BlameHover,
374        /// Cancels the current operation.
375        Cancel,
376        /// Cancels the running flycheck operation.
377        CancelFlycheck,
378        /// Cancels pending language server work.
379        CancelLanguageServerWork,
380        /// Clears flycheck results.
381        ClearFlycheck,
382        /// Confirms the rename operation.
383        ConfirmRename,
384        /// Confirms completion by inserting at cursor.
385        ConfirmCompletionInsert,
386        /// Confirms completion by replacing existing text.
387        ConfirmCompletionReplace,
388        /// Navigates to the first item in the context menu.
389        ContextMenuFirst,
390        /// Navigates to the last item in the context menu.
391        ContextMenuLast,
392        /// Navigates to the next item in the context menu.
393        ContextMenuNext,
394        /// Navigates to the previous item in the context menu.
395        ContextMenuPrevious,
396        /// Converts indentation from tabs to spaces.
397        ConvertIndentationToSpaces,
398        /// Converts indentation from spaces to tabs.
399        ConvertIndentationToTabs,
400        /// Converts selected text to kebab-case.
401        ConvertToKebabCase,
402        /// Converts selected text to lowerCamelCase.
403        ConvertToLowerCamelCase,
404        /// Converts selected text to lowercase.
405        ConvertToLowerCase,
406        /// Toggles the case of selected text.
407        ConvertToOppositeCase,
408        /// Converts selected text to sentence case.
409        ConvertToSentenceCase,
410        /// Converts selected text to snake_case.
411        ConvertToSnakeCase,
412        /// Converts selected text to Title Case.
413        ConvertToTitleCase,
414        /// Converts selected text to UpperCamelCase.
415        ConvertToUpperCamelCase,
416        /// Converts selected text to UPPERCASE.
417        ConvertToUpperCase,
418        /// Applies ROT13 cipher to selected text.
419        ConvertToRot13,
420        /// Applies ROT47 cipher to selected text.
421        ConvertToRot47,
422        /// Copies selected text to the clipboard.
423        Copy,
424        /// Copies selected text to the clipboard with leading/trailing whitespace trimmed.
425        CopyAndTrim,
426        /// Copies the current file location to the clipboard.
427        CopyFileLocation,
428        /// Copies the highlighted text as JSON.
429        CopyHighlightJson,
430        /// Copies the current file name to the clipboard.
431        CopyFileName,
432        /// Copies the file name without extension to the clipboard.
433        CopyFileNameWithoutExtension,
434        /// Copies a permalink to the current line.
435        CopyPermalinkToLine,
436        /// Cuts selected text to the clipboard.
437        Cut,
438        /// Deletes the character after the cursor.
439        Delete,
440        /// Deletes the current line.
441        DeleteLine,
442        /// Deletes from cursor to end of line.
443        DeleteToEndOfLine,
444        /// Deletes to the end of the next subword.
445        DeleteToNextSubwordEnd,
446        /// Deletes to the start of the previous subword.
447        DeleteToPreviousSubwordStart,
448        /// Diffs the text stored in the clipboard against the current selection.
449        DiffClipboardWithSelection,
450        /// Displays names of all active cursors.
451        DisplayCursorNames,
452        /// Duplicates the current line below.
453        DuplicateLineDown,
454        /// Duplicates the current line above.
455        DuplicateLineUp,
456        /// Duplicates the current selection.
457        DuplicateSelection,
458        /// Expands all diff hunks in the editor.
459        #[action(deprecated_aliases = ["editor::ExpandAllHunkDiffs"])]
460        ExpandAllDiffHunks,
461        /// Expands macros recursively at cursor position.
462        ExpandMacroRecursively,
463        /// Finds all references to the symbol at cursor.
464        FindAllReferences,
465        /// Finds the next match in the search.
466        FindNextMatch,
467        /// Finds the previous match in the search.
468        FindPreviousMatch,
469        /// Folds the current code block.
470        Fold,
471        /// Folds all foldable regions in the editor.
472        FoldAll,
473        /// Folds all code blocks at indentation level 1.
474        #[action(name = "FoldAtLevel_1")]
475        FoldAtLevel1,
476        /// Folds all code blocks at indentation level 2.
477        #[action(name = "FoldAtLevel_2")]
478        FoldAtLevel2,
479        /// Folds all code blocks at indentation level 3.
480        #[action(name = "FoldAtLevel_3")]
481        FoldAtLevel3,
482        /// Folds all code blocks at indentation level 4.
483        #[action(name = "FoldAtLevel_4")]
484        FoldAtLevel4,
485        /// Folds all code blocks at indentation level 5.
486        #[action(name = "FoldAtLevel_5")]
487        FoldAtLevel5,
488        /// Folds all code blocks at indentation level 6.
489        #[action(name = "FoldAtLevel_6")]
490        FoldAtLevel6,
491        /// Folds all code blocks at indentation level 7.
492        #[action(name = "FoldAtLevel_7")]
493        FoldAtLevel7,
494        /// Folds all code blocks at indentation level 8.
495        #[action(name = "FoldAtLevel_8")]
496        FoldAtLevel8,
497        /// Folds all code blocks at indentation level 9.
498        #[action(name = "FoldAtLevel_9")]
499        FoldAtLevel9,
500        /// Folds all function bodies in the editor.
501        FoldFunctionBodies,
502        /// Folds the current code block and all its children.
503        FoldRecursive,
504        /// Folds the selected ranges.
505        FoldSelectedRanges,
506        /// Toggles focus back to the last active buffer.
507        ToggleFocus,
508        /// Toggles folding at the current position.
509        ToggleFold,
510        /// Toggles recursive folding at the current position.
511        ToggleFoldRecursive,
512        /// Toggles all folds in a buffer or all excerpts in multibuffer.
513        ToggleFoldAll,
514        /// Formats the entire document.
515        Format,
516        /// Formats only the selected text.
517        FormatSelections,
518        /// Goes to the declaration of the symbol at cursor.
519        GoToDeclaration,
520        /// Goes to declaration in a split pane.
521        GoToDeclarationSplit,
522        /// Goes to the definition of the symbol at cursor.
523        GoToDefinition,
524        /// Goes to definition in a split pane.
525        GoToDefinitionSplit,
526        /// Goes to the next diff hunk.
527        GoToHunk,
528        /// Goes to the previous diff hunk.
529        GoToPreviousHunk,
530        /// Goes to the implementation of the symbol at cursor.
531        GoToImplementation,
532        /// Goes to implementation in a split pane.
533        GoToImplementationSplit,
534        /// Goes to the next change in the file.
535        GoToNextChange,
536        /// Goes to the parent module of the current file.
537        GoToParentModule,
538        /// Goes to the previous change in the file.
539        GoToPreviousChange,
540        /// Goes to the type definition of the symbol at cursor.
541        GoToTypeDefinition,
542        /// Goes to type definition in a split pane.
543        GoToTypeDefinitionSplit,
544        /// Goes to the next document highlight.
545        GoToNextDocumentHighlight,
546        /// Goes to the previous document highlight.
547        GoToPreviousDocumentHighlight,
548        /// Scrolls down by half a page.
549        HalfPageDown,
550        /// Scrolls up by half a page.
551        HalfPageUp,
552        /// Shows hover information for the symbol at cursor.
553        Hover,
554        /// Increases indentation of selected lines.
555        Indent,
556        /// Inserts a UUID v4 at cursor position.
557        InsertUuidV4,
558        /// Inserts a UUID v7 at cursor position.
559        InsertUuidV7,
560        /// Joins the current line with the next line.
561        JoinLines,
562        /// Cuts to kill ring (Emacs-style).
563        KillRingCut,
564        /// Yanks from kill ring (Emacs-style).
565        KillRingYank,
566        /// Moves cursor down one line.
567        LineDown,
568        /// Moves cursor up one line.
569        LineUp,
570        /// Moves cursor down.
571        MoveDown,
572        /// Moves cursor left.
573        MoveLeft,
574        /// Moves the current line down.
575        MoveLineDown,
576        /// Moves the current line up.
577        MoveLineUp,
578        /// Moves cursor right.
579        MoveRight,
580        /// Moves cursor to the beginning of the document.
581        MoveToBeginning,
582        /// Moves cursor to the enclosing bracket.
583        MoveToEnclosingBracket,
584        /// Moves cursor to the end of the document.
585        MoveToEnd,
586        /// Moves cursor to the end of the paragraph.
587        MoveToEndOfParagraph,
588        /// Moves cursor to the end of the next subword.
589        MoveToNextSubwordEnd,
590        /// Moves cursor to the end of the next word.
591        MoveToNextWordEnd,
592        /// Moves cursor to the start of the previous subword.
593        MoveToPreviousSubwordStart,
594        /// Moves cursor to the start of the previous word.
595        MoveToPreviousWordStart,
596        /// Moves cursor to the start of the paragraph.
597        MoveToStartOfParagraph,
598        /// Moves cursor to the start of the current excerpt.
599        MoveToStartOfExcerpt,
600        /// Moves cursor to the start of the next excerpt.
601        MoveToStartOfNextExcerpt,
602        /// Moves cursor to the end of the current excerpt.
603        MoveToEndOfExcerpt,
604        /// Moves cursor to the end of the previous excerpt.
605        MoveToEndOfPreviousExcerpt,
606        /// Moves cursor up.
607        MoveUp,
608        /// Inserts a new line and moves cursor to it.
609        Newline,
610        /// Inserts a new line above the current line.
611        NewlineAbove,
612        /// Inserts a new line below the current line.
613        NewlineBelow,
614        /// Navigates to the next edit prediction.
615        NextEditPrediction,
616        /// Scrolls to the next screen.
617        NextScreen,
618        /// Opens the context menu at cursor position.
619        OpenContextMenu,
620        /// Opens excerpts from the current file.
621        OpenExcerpts,
622        /// Opens excerpts in a split pane.
623        OpenExcerptsSplit,
624        /// Opens the proposed changes editor.
625        OpenProposedChangesEditor,
626        /// Opens documentation for the symbol at cursor.
627        OpenDocs,
628        /// Opens a permalink to the current line.
629        OpenPermalinkToLine,
630        /// Opens the file whose name is selected in the editor.
631        #[action(deprecated_aliases = ["editor::OpenFile"])]
632        OpenSelectedFilename,
633        /// Opens all selections in a multibuffer.
634        OpenSelectionsInMultibuffer,
635        /// Opens the URL at cursor position.
636        OpenUrl,
637        /// Organizes import statements.
638        OrganizeImports,
639        /// Decreases indentation of selected lines.
640        Outdent,
641        /// Automatically adjusts indentation based on context.
642        AutoIndent,
643        /// Scrolls down by one page.
644        PageDown,
645        /// Scrolls up by one page.
646        PageUp,
647        /// Pastes from clipboard.
648        Paste,
649        /// Navigates to the previous edit prediction.
650        PreviousEditPrediction,
651        /// Redoes the last undone edit.
652        Redo,
653        /// Redoes the last selection change.
654        RedoSelection,
655        /// Renames the symbol at cursor.
656        Rename,
657        /// Restarts the language server for the current file.
658        RestartLanguageServer,
659        /// Reveals the current file in the system file manager.
660        RevealInFileManager,
661        /// Reverses the order of selected lines.
662        ReverseLines,
663        /// Reloads the file from disk.
664        ReloadFile,
665        /// Rewraps text to fit within the preferred line length.
666        Rewrap,
667        /// Runs flycheck diagnostics.
668        RunFlycheck,
669        /// Scrolls the cursor to the bottom of the viewport.
670        ScrollCursorBottom,
671        /// Scrolls the cursor to the center of the viewport.
672        ScrollCursorCenter,
673        /// Cycles cursor position between center, top, and bottom.
674        ScrollCursorCenterTopBottom,
675        /// Scrolls the cursor to the top of the viewport.
676        ScrollCursorTop,
677        /// Selects all text in the editor.
678        SelectAll,
679        /// Selects all matches of the current selection.
680        SelectAllMatches,
681        /// Selects to the start of the current excerpt.
682        SelectToStartOfExcerpt,
683        /// Selects to the start of the next excerpt.
684        SelectToStartOfNextExcerpt,
685        /// Selects to the end of the current excerpt.
686        SelectToEndOfExcerpt,
687        /// Selects to the end of the previous excerpt.
688        SelectToEndOfPreviousExcerpt,
689        /// Extends selection down.
690        SelectDown,
691        /// Selects the enclosing symbol.
692        SelectEnclosingSymbol,
693        /// Selects the next larger syntax node.
694        SelectLargerSyntaxNode,
695        /// Selects the next syntax node sibling.
696        SelectNextSyntaxNode,
697        /// Selects the previous syntax node sibling.
698        SelectPreviousSyntaxNode,
699        /// Extends selection left.
700        SelectLeft,
701        /// Selects the current line.
702        SelectLine,
703        /// Extends selection down by one page.
704        SelectPageDown,
705        /// Extends selection up by one page.
706        SelectPageUp,
707        /// Extends selection right.
708        SelectRight,
709        /// Selects the next smaller syntax node.
710        SelectSmallerSyntaxNode,
711        /// Selects to the beginning of the document.
712        SelectToBeginning,
713        /// Selects to the end of the document.
714        SelectToEnd,
715        /// Selects to the end of the paragraph.
716        SelectToEndOfParagraph,
717        /// Selects to the end of the next subword.
718        SelectToNextSubwordEnd,
719        /// Selects to the end of the next word.
720        SelectToNextWordEnd,
721        /// Selects to the start of the previous subword.
722        SelectToPreviousSubwordStart,
723        /// Selects to the start of the previous word.
724        SelectToPreviousWordStart,
725        /// Selects to the start of the paragraph.
726        SelectToStartOfParagraph,
727        /// Extends selection up.
728        SelectUp,
729        /// Shows the system character palette.
730        ShowCharacterPalette,
731        /// Shows edit prediction at cursor.
732        ShowEditPrediction,
733        /// Shows signature help for the current function.
734        ShowSignatureHelp,
735        /// Shows word completions.
736        ShowWordCompletions,
737        /// Randomly shuffles selected lines.
738        ShuffleLines,
739        /// Navigates to the next signature in the signature help popup.
740        SignatureHelpNext,
741        /// Navigates to the previous signature in the signature help popup.
742        SignatureHelpPrevious,
743        /// Sorts selected lines by length.
744        SortLinesByLength,
745        /// Sorts selected lines case-insensitively.
746        SortLinesCaseInsensitive,
747        /// Sorts selected lines case-sensitively.
748        SortLinesCaseSensitive,
749        /// Stops the language server for the current file.
750        StopLanguageServer,
751        /// Switches between source and header files.
752        SwitchSourceHeader,
753        /// Inserts a tab character or indents.
754        Tab,
755        /// Removes a tab character or outdents.
756        Backtab,
757        /// Toggles a breakpoint at the current line.
758        ToggleBreakpoint,
759        /// Toggles the case of selected text.
760        ToggleCase,
761        /// Disables the breakpoint at the current line.
762        DisableBreakpoint,
763        /// Enables the breakpoint at the current line.
764        EnableBreakpoint,
765        /// Edits the log message for a breakpoint.
766        EditLogBreakpoint,
767        /// Toggles automatic signature help.
768        ToggleAutoSignatureHelp,
769        /// Toggles inline git blame display.
770        ToggleGitBlameInline,
771        /// Opens the git commit for the blame at cursor.
772        OpenGitBlameCommit,
773        /// Toggles the diagnostics panel.
774        ToggleDiagnostics,
775        /// Toggles indent guides display.
776        ToggleIndentGuides,
777        /// Toggles inlay hints display.
778        ToggleInlayHints,
779        /// Toggles inline values display.
780        ToggleInlineValues,
781        /// Toggles inline diagnostics display.
782        ToggleInlineDiagnostics,
783        /// Toggles edit prediction feature.
784        ToggleEditPrediction,
785        /// Toggles line numbers display.
786        ToggleLineNumbers,
787        /// Toggles the minimap display.
788        ToggleMinimap,
789        /// Swaps the start and end of the current selection.
790        SwapSelectionEnds,
791        /// Sets a mark at the current position.
792        SetMark,
793        /// Toggles relative line numbers display.
794        ToggleRelativeLineNumbers,
795        /// Toggles diff display for selected hunks.
796        #[action(deprecated_aliases = ["editor::ToggleHunkDiff"])]
797        ToggleSelectedDiffHunks,
798        /// Toggles the selection menu.
799        ToggleSelectionMenu,
800        /// Toggles soft wrap mode.
801        ToggleSoftWrap,
802        /// Toggles the tab bar display.
803        ToggleTabBar,
804        /// Transposes characters around cursor.
805        Transpose,
806        /// Undoes the last edit.
807        Undo,
808        /// Undoes the last selection change.
809        UndoSelection,
810        /// Unfolds all folded regions.
811        UnfoldAll,
812        /// Unfolds lines at cursor.
813        UnfoldLines,
814        /// Unfolds recursively at cursor.
815        UnfoldRecursive,
816        /// Removes duplicate lines (case-insensitive).
817        UniqueLinesCaseInsensitive,
818        /// Removes duplicate lines (case-sensitive).
819        UniqueLinesCaseSensitive,
820        /// Removes the surrounding syntax node (for example brackets, or closures)
821        /// from the current selections.
822        UnwrapSyntaxNode,
823        /// Wraps selections in tag specified by language.
824        WrapSelectionsInTag
825    ]
826);