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