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