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