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