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