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