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#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
232#[action(namespace = editor)]
233#[serde(deny_unknown_fields)]
234pub struct DeleteToNextWordEnd {
235    #[serde(default)]
236    pub ignore_newlines: bool,
237}
238
239/// Deletes from the cursor to the start of the previous word.
240#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
241#[action(namespace = editor)]
242#[serde(deny_unknown_fields)]
243pub struct DeleteToPreviousWordStart {
244    #[serde(default)]
245    pub ignore_newlines: bool,
246}
247
248/// Folds all code blocks at the specified indentation level.
249#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
250#[action(namespace = editor)]
251pub struct FoldAtLevel(pub u32);
252
253/// Spawns the nearest available task from the current cursor position.
254#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
255#[action(namespace = editor)]
256#[serde(deny_unknown_fields)]
257pub struct SpawnNearestTask {
258    #[serde(default)]
259    pub reveal: task::RevealStrategy,
260}
261
262#[derive(Debug, PartialEq, Eq, Clone, Copy, Deserialize, Default)]
263pub enum UuidVersion {
264    #[default]
265    V4,
266    V7,
267}
268
269/// Goes to the next diagnostic in the file.
270#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
271#[action(namespace = editor)]
272#[serde(deny_unknown_fields)]
273pub struct GoToDiagnostic {
274    #[serde(default)]
275    pub severity: GoToDiagnosticSeverityFilter,
276}
277
278/// Goes to the previous diagnostic in the file.
279#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
280#[action(namespace = editor)]
281#[serde(deny_unknown_fields)]
282pub struct GoToPreviousDiagnostic {
283    #[serde(default)]
284    pub severity: GoToDiagnosticSeverityFilter,
285}
286
287actions!(
288    debugger,
289    [
290        /// Runs program execution to the current cursor position.
291        RunToCursor,
292        /// Evaluates the selected text in the debugger context.
293        EvaluateSelectedText
294    ]
295);
296
297actions!(
298    go_to_line,
299    [
300        /// Toggles the go to line dialog.
301        #[action(name = "Toggle")]
302        ToggleGoToLine
303    ]
304);
305
306actions!(
307    editor,
308    [
309        /// Accepts the full edit prediction.
310        AcceptEditPrediction,
311        /// Accepts a partial Copilot suggestion.
312        AcceptPartialCopilotSuggestion,
313        /// Accepts a partial edit prediction.
314        AcceptPartialEditPrediction,
315        /// Adds a cursor above the current selection.
316        AddSelectionAbove,
317        /// Adds a cursor below the current selection.
318        AddSelectionBelow,
319        /// Applies all diff hunks in the editor.
320        ApplyAllDiffHunks,
321        /// Applies the diff hunk at the current position.
322        ApplyDiffHunk,
323        /// Deletes the character before the cursor.
324        Backspace,
325        /// Cancels the current operation.
326        Cancel,
327        /// Cancels the running flycheck operation.
328        CancelFlycheck,
329        /// Cancels pending language server work.
330        CancelLanguageServerWork,
331        /// Clears flycheck results.
332        ClearFlycheck,
333        /// Confirms the rename operation.
334        ConfirmRename,
335        /// Confirms completion by inserting at cursor.
336        ConfirmCompletionInsert,
337        /// Confirms completion by replacing existing text.
338        ConfirmCompletionReplace,
339        /// Navigates to the first item in the context menu.
340        ContextMenuFirst,
341        /// Navigates to the last item in the context menu.
342        ContextMenuLast,
343        /// Navigates to the next item in the context menu.
344        ContextMenuNext,
345        /// Navigates to the previous item in the context menu.
346        ContextMenuPrevious,
347        /// Converts indentation from tabs to spaces.
348        ConvertIndentationToSpaces,
349        /// Converts indentation from spaces to tabs.
350        ConvertIndentationToTabs,
351        /// Converts selected text to kebab-case.
352        ConvertToKebabCase,
353        /// Converts selected text to lowerCamelCase.
354        ConvertToLowerCamelCase,
355        /// Converts selected text to lowercase.
356        ConvertToLowerCase,
357        /// Toggles the case of selected text.
358        ConvertToOppositeCase,
359        /// Converts selected text to snake_case.
360        ConvertToSnakeCase,
361        /// Converts selected text to Title Case.
362        ConvertToTitleCase,
363        /// Converts selected text to UpperCamelCase.
364        ConvertToUpperCamelCase,
365        /// Converts selected text to UPPERCASE.
366        ConvertToUpperCase,
367        /// Applies ROT13 cipher to selected text.
368        ConvertToRot13,
369        /// Applies ROT47 cipher to selected text.
370        ConvertToRot47,
371        /// Copies selected text to the clipboard.
372        Copy,
373        /// Copies selected text to the clipboard with leading/trailing whitespace trimmed.
374        CopyAndTrim,
375        /// Copies the current file location to the clipboard.
376        CopyFileLocation,
377        /// Copies the highlighted text as JSON.
378        CopyHighlightJson,
379        /// Copies the current file name to the clipboard.
380        CopyFileName,
381        /// Copies the file name without extension to the clipboard.
382        CopyFileNameWithoutExtension,
383        /// Copies a permalink to the current line.
384        CopyPermalinkToLine,
385        /// Cuts selected text to the clipboard.
386        Cut,
387        /// Cuts from cursor to end of line.
388        CutToEndOfLine,
389        /// Deletes the character after the cursor.
390        Delete,
391        /// Deletes the current line.
392        DeleteLine,
393        /// Deletes from cursor to end of line.
394        DeleteToEndOfLine,
395        /// Deletes to the end of the next subword.
396        DeleteToNextSubwordEnd,
397        /// Deletes to the start of the previous subword.
398        DeleteToPreviousSubwordStart,
399        /// Displays names of all active cursors.
400        DisplayCursorNames,
401        /// Duplicates the current line below.
402        DuplicateLineDown,
403        /// Duplicates the current line above.
404        DuplicateLineUp,
405        /// Duplicates the current selection.
406        DuplicateSelection,
407        /// Expands all diff hunks in the editor.
408        #[action(deprecated_aliases = ["editor::ExpandAllHunkDiffs"])]
409        ExpandAllDiffHunks,
410        /// Expands macros recursively at cursor position.
411        ExpandMacroRecursively,
412        /// Finds all references to the symbol at cursor.
413        FindAllReferences,
414        /// Finds the next match in the search.
415        FindNextMatch,
416        /// Finds the previous match in the search.
417        FindPreviousMatch,
418        /// Folds the current code block.
419        Fold,
420        /// Folds all foldable regions in the editor.
421        FoldAll,
422        /// Folds all function bodies in the editor.
423        FoldFunctionBodies,
424        /// Folds the current code block and all its children.
425        FoldRecursive,
426        /// Folds the selected ranges.
427        FoldSelectedRanges,
428        /// Toggles folding at the current position.
429        ToggleFold,
430        /// Toggles recursive folding at the current position.
431        ToggleFoldRecursive,
432        /// Toggles all folds in a buffer or all excerpts in multibuffer.
433        ToggleFoldAll,
434        /// Formats the entire document.
435        Format,
436        /// Formats only the selected text.
437        FormatSelections,
438        /// Goes to the declaration of the symbol at cursor.
439        GoToDeclaration,
440        /// Goes to declaration in a split pane.
441        GoToDeclarationSplit,
442        /// Goes to the definition of the symbol at cursor.
443        GoToDefinition,
444        /// Goes to definition in a split pane.
445        GoToDefinitionSplit,
446        /// Goes to the next diff hunk.
447        GoToHunk,
448        /// Goes to the previous diff hunk.
449        GoToPreviousHunk,
450        /// Goes to the implementation of the symbol at cursor.
451        GoToImplementation,
452        /// Goes to implementation in a split pane.
453        GoToImplementationSplit,
454        /// Goes to the next change in the file.
455        GoToNextChange,
456        /// Goes to the parent module of the current file.
457        GoToParentModule,
458        /// Goes to the previous change in the file.
459        GoToPreviousChange,
460        /// Goes to the type definition of the symbol at cursor.
461        GoToTypeDefinition,
462        /// Goes to type definition in a split pane.
463        GoToTypeDefinitionSplit,
464        /// Scrolls down by half a page.
465        HalfPageDown,
466        /// Scrolls up by half a page.
467        HalfPageUp,
468        /// Shows hover information for the symbol at cursor.
469        Hover,
470        /// Increases indentation of selected lines.
471        Indent,
472        /// Inserts a UUID v4 at cursor position.
473        InsertUuidV4,
474        /// Inserts a UUID v7 at cursor position.
475        InsertUuidV7,
476        /// Joins the current line with the next line.
477        JoinLines,
478        /// Cuts to kill ring (Emacs-style).
479        KillRingCut,
480        /// Yanks from kill ring (Emacs-style).
481        KillRingYank,
482        /// Moves cursor down one line.
483        LineDown,
484        /// Moves cursor up one line.
485        LineUp,
486        /// Moves cursor down.
487        MoveDown,
488        /// Moves cursor left.
489        MoveLeft,
490        /// Moves the current line down.
491        MoveLineDown,
492        /// Moves the current line up.
493        MoveLineUp,
494        /// Moves cursor right.
495        MoveRight,
496        /// Moves cursor to the beginning of the document.
497        MoveToBeginning,
498        /// Moves cursor to the enclosing bracket.
499        MoveToEnclosingBracket,
500        /// Moves cursor to the end of the document.
501        MoveToEnd,
502        /// Moves cursor to the end of the paragraph.
503        MoveToEndOfParagraph,
504        /// Moves cursor to the end of the next subword.
505        MoveToNextSubwordEnd,
506        /// Moves cursor to the end of the next word.
507        MoveToNextWordEnd,
508        /// Moves cursor to the start of the previous subword.
509        MoveToPreviousSubwordStart,
510        /// Moves cursor to the start of the previous word.
511        MoveToPreviousWordStart,
512        /// Moves cursor to the start of the paragraph.
513        MoveToStartOfParagraph,
514        /// Moves cursor to the start of the current excerpt.
515        MoveToStartOfExcerpt,
516        /// Moves cursor to the start of the next excerpt.
517        MoveToStartOfNextExcerpt,
518        /// Moves cursor to the end of the current excerpt.
519        MoveToEndOfExcerpt,
520        /// Moves cursor to the end of the previous excerpt.
521        MoveToEndOfPreviousExcerpt,
522        /// Moves cursor up.
523        MoveUp,
524        /// Inserts a new line and moves cursor to it.
525        Newline,
526        /// Inserts a new line above the current line.
527        NewlineAbove,
528        /// Inserts a new line below the current line.
529        NewlineBelow,
530        /// Navigates to the next edit prediction.
531        NextEditPrediction,
532        /// Scrolls to the next screen.
533        NextScreen,
534        /// Opens the context menu at cursor position.
535        OpenContextMenu,
536        /// Opens excerpts from the current file.
537        OpenExcerpts,
538        /// Opens excerpts in a split pane.
539        OpenExcerptsSplit,
540        /// Opens the proposed changes editor.
541        OpenProposedChangesEditor,
542        /// Opens documentation for the symbol at cursor.
543        OpenDocs,
544        /// Opens a permalink to the current line.
545        OpenPermalinkToLine,
546        /// Opens the file whose name is selected in the editor.
547        #[action(deprecated_aliases = ["editor::OpenFile"])]
548        OpenSelectedFilename,
549        /// Opens all selections in a multibuffer.
550        OpenSelectionsInMultibuffer,
551        /// Opens the URL at cursor position.
552        OpenUrl,
553        /// Organizes import statements.
554        OrganizeImports,
555        /// Decreases indentation of selected lines.
556        Outdent,
557        /// Automatically adjusts indentation based on context.
558        AutoIndent,
559        /// Scrolls down by one page.
560        PageDown,
561        /// Scrolls up by one page.
562        PageUp,
563        /// Pastes from clipboard.
564        Paste,
565        /// Navigates to the previous edit prediction.
566        PreviousEditPrediction,
567        /// Redoes the last undone edit.
568        Redo,
569        /// Redoes the last selection change.
570        RedoSelection,
571        /// Renames the symbol at cursor.
572        Rename,
573        /// Restarts the language server for the current file.
574        RestartLanguageServer,
575        /// Reveals the current file in the system file manager.
576        RevealInFileManager,
577        /// Reverses the order of selected lines.
578        ReverseLines,
579        /// Reloads the file from disk.
580        ReloadFile,
581        /// Rewraps text to fit within the preferred line length.
582        Rewrap,
583        /// Runs flycheck diagnostics.
584        RunFlycheck,
585        /// Scrolls the cursor to the bottom of the viewport.
586        ScrollCursorBottom,
587        /// Scrolls the cursor to the center of the viewport.
588        ScrollCursorCenter,
589        /// Cycles cursor position between center, top, and bottom.
590        ScrollCursorCenterTopBottom,
591        /// Scrolls the cursor to the top of the viewport.
592        ScrollCursorTop,
593        /// Selects all text in the editor.
594        SelectAll,
595        /// Selects all matches of the current selection.
596        SelectAllMatches,
597        /// Selects to the start of the current excerpt.
598        SelectToStartOfExcerpt,
599        /// Selects to the start of the next excerpt.
600        SelectToStartOfNextExcerpt,
601        /// Selects to the end of the current excerpt.
602        SelectToEndOfExcerpt,
603        /// Selects to the end of the previous excerpt.
604        SelectToEndOfPreviousExcerpt,
605        /// Extends selection down.
606        SelectDown,
607        /// Selects the enclosing symbol.
608        SelectEnclosingSymbol,
609        /// Selects the next larger syntax node.
610        SelectLargerSyntaxNode,
611        /// Extends selection left.
612        SelectLeft,
613        /// Selects the current line.
614        SelectLine,
615        /// Extends selection down by one page.
616        SelectPageDown,
617        /// Extends selection up by one page.
618        SelectPageUp,
619        /// Extends selection right.
620        SelectRight,
621        /// Selects the next smaller syntax node.
622        SelectSmallerSyntaxNode,
623        /// Selects to the beginning of the document.
624        SelectToBeginning,
625        /// Selects to the end of the document.
626        SelectToEnd,
627        /// Selects to the end of the paragraph.
628        SelectToEndOfParagraph,
629        /// Selects to the end of the next subword.
630        SelectToNextSubwordEnd,
631        /// Selects to the end of the next word.
632        SelectToNextWordEnd,
633        /// Selects to the start of the previous subword.
634        SelectToPreviousSubwordStart,
635        /// Selects to the start of the previous word.
636        SelectToPreviousWordStart,
637        /// Selects to the start of the paragraph.
638        SelectToStartOfParagraph,
639        /// Extends selection up.
640        SelectUp,
641        /// Shows the system character palette.
642        ShowCharacterPalette,
643        /// Shows edit prediction at cursor.
644        ShowEditPrediction,
645        /// Shows signature help for the current function.
646        ShowSignatureHelp,
647        /// Shows word completions.
648        ShowWordCompletions,
649        /// Randomly shuffles selected lines.
650        ShuffleLines,
651        /// Navigates to the next signature in the signature help popup.
652        SignatureHelpNext,
653        /// Navigates to the previous signature in the signature help popup.
654        SignatureHelpPrevious,
655        /// Sorts selected lines by length.
656        SortLinesByLength,
657        /// Sorts selected lines case-insensitively.
658        SortLinesCaseInsensitive,
659        /// Sorts selected lines case-sensitively.
660        SortLinesCaseSensitive,
661        /// Splits selection into individual lines.
662        SplitSelectionIntoLines,
663        /// Stops the language server for the current file.
664        StopLanguageServer,
665        /// Switches between source and header files.
666        SwitchSourceHeader,
667        /// Inserts a tab character or indents.
668        Tab,
669        /// Removes a tab character or outdents.
670        Backtab,
671        /// Toggles a breakpoint at the current line.
672        ToggleBreakpoint,
673        /// Toggles the case of selected text.
674        ToggleCase,
675        /// Disables the breakpoint at the current line.
676        DisableBreakpoint,
677        /// Enables the breakpoint at the current line.
678        EnableBreakpoint,
679        /// Edits the log message for a breakpoint.
680        EditLogBreakpoint,
681        /// Toggles automatic signature help.
682        ToggleAutoSignatureHelp,
683        /// Toggles inline git blame display.
684        ToggleGitBlameInline,
685        /// Opens the git commit for the blame at cursor.
686        OpenGitBlameCommit,
687        /// Toggles the diagnostics panel.
688        ToggleDiagnostics,
689        /// Toggles indent guides display.
690        ToggleIndentGuides,
691        /// Toggles inlay hints display.
692        ToggleInlayHints,
693        /// Toggles inline values display.
694        ToggleInlineValues,
695        /// Toggles inline diagnostics display.
696        ToggleInlineDiagnostics,
697        /// Toggles edit prediction feature.
698        ToggleEditPrediction,
699        /// Toggles line numbers display.
700        ToggleLineNumbers,
701        /// Toggles the minimap display.
702        ToggleMinimap,
703        /// Swaps the start and end of the current selection.
704        SwapSelectionEnds,
705        /// Sets a mark at the current position.
706        SetMark,
707        /// Toggles relative line numbers display.
708        ToggleRelativeLineNumbers,
709        /// Toggles diff display for selected hunks.
710        #[action(deprecated_aliases = ["editor::ToggleHunkDiff"])]
711        ToggleSelectedDiffHunks,
712        /// Toggles the selection menu.
713        ToggleSelectionMenu,
714        /// Toggles soft wrap mode.
715        ToggleSoftWrap,
716        /// Toggles the tab bar display.
717        ToggleTabBar,
718        /// Transposes characters around cursor.
719        Transpose,
720        /// Undoes the last edit.
721        Undo,
722        /// Undoes the last selection change.
723        UndoSelection,
724        /// Unfolds all folded regions.
725        UnfoldAll,
726        /// Unfolds lines at cursor.
727        UnfoldLines,
728        /// Unfolds recursively at cursor.
729        UnfoldRecursive,
730        /// Removes duplicate lines (case-insensitive).
731        UniqueLinesCaseInsensitive,
732        /// Removes duplicate lines (case-sensitive).
733        UniqueLinesCaseSensitive,
734    ]
735);