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