actions.rs

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