Skip to main content

Module input

Module input 

Source
Expand description

Text input: the shared editing engine and the three states built on it.

Nothing here should be pub unless it is reachable from outside the crate. A pub on an item behind a private module says something the module path contradicts, and it hides the real API surface from anyone reading it.

Re-exports§

pub use language_config::AutoClosingPair;
pub use language_config::BracketPair;
pub use language_config::IndentationRules;

Modules§

language_config
Language-specific bracket pairing and indentation rules.

Structs§

AddCursorAbove
AddCursorBelow
Backspace
BufferPoint
Position in the buffer (logical text).
CodeActionItem
CodeActionMenuState
CompletionMenuOptions
Display options for the LSP completion popover.
CompletionMenuState
Copy
Cut
Delete
DeleteToBeginningOfLine
DeleteToEndOfLine
DeleteToNextWordEnd
DeleteToPreviousWordStart
Diagnostic
DiagnosticColors
DiagnosticEntry
DiagnosticSet
DiagnosticSummary
DisplayMap
DisplayMap is the main interface for Editor/Input coordinate mapping.
DisplayPoint
Final display position (after soft-wrapping and folding).
Editor
An unstyled source-code editor.
EditorExtras
What a code editor adds on top of multi-line text: language features.
EditorMode
Source code, with language features: the mode of crate::input::EditorState.
Enter
Escape
FoldRange
A foldable line range supplied by an editor highlighter or another source.
GoToDefinition
HoverPopoverState
Indent
IndentInline
Input
An unstyled single-line text input.
InputBase
The foundational input frame.
InputBaseState
The shared text-editing engine behind crate::input::InputState, crate::input::TextareaState and crate::input::EditorState.
InputContextMenuCapabilities
What the input can offer to its context menu, at the moment it is opened.
InputEdit
Parser-independent description of an incremental text replacement.
InputEditorStyle
Application-owned colors and highlight resolver consumed by editor painting.
InputMode
A single-line text field: the mode of crate::input::InputState.
InputPresentation
Read-only styling data exposed to presentation facades.
InputStyles
Lsp
LSP ServerCapabilities
MoveDown
MoveEnd
MoveHome
MoveLeft
MovePageDown
MovePageUp
MoveRight
MoveToEnd
MoveToEndOfLine
MoveToNextWord
MoveToPreviousWord
MoveToStart
MoveToStartOfLine
MoveUp
NativeMenu
Presentation-independent context-menu model produced by the editor.
Outdent
OutdentInline
Paste
Point
Parser-independent byte/row/column position used for incremental edits.
Position
Position in a text document expressed as zero-based line and character offset. A position is between two characters like an ‘insert’ cursor in a editor.
Redo
Replace
Rope
A utf8 text rope.
RopeLines
An iterator over the lines of a Rope.
Search
SearchMatcher
Stateful, presentation-independent search engine used by text inputs.
SearchSession
SelectAll
SelectToEnd
SelectToEndOfLine
SelectToNextWordEnd
SelectToPreviousWordStart
SelectToStart
SelectToStartOfLine
Selection
A selection in the text, represented by start and end byte indices.
ShowCharacterPalette
TabSize
TextDecoration
A presentation style applied to a UTF-8 byte range in an input.
TextDecorationCollection
An independently managed collection of TextDecorations.
Textarea
An unstyled ordinary multi-line text input.
TextareaMode
Ordinary multi-line text: the mode of crate::input::TextareaState.
ToggleCodeActions
Undo

Enums§

DiagnosticSeverity
InputEvent
InputOverlayKind
MaskPattern
NativeMenuItem
NumberInputEvent
NumberStep
Strategy used by numeric editors when stepping their value.
SyntaxContext
Where in the syntax tree an offset sits, for editing decisions.
WrappingIndent
Controls how soft-wrapped continuation lines are indented.

Traits§

CodeActionProvider
CompletionProvider
A trait for providing code completions based on the current input state and context.
DefinitionProvider
Definition provider
DocumentColorProvider
DocumentRangeSemanticTokensProvider
A provider of semantic highlighting tokens, layered on top of the built-in tree-sitter SyntaxHighlighter.
HighlightStyleResolver
Resolves semantic highlight names into renderable GPUI styles.
HoverProvider
Hover provider
InputExtras
What the renderer may read out of a mode’s extra state.
InputHighlighter
Parser-independent syntax highlighting seam consumed by the Base editor.
InputModeKind
Hooks the shared engine calls back into for mode-specific work.
LanguageProvider
Supplies language identities, editing defaults, and syntax providers to Base.
MultiLineMode
The modes whose layout spans more than one line: TextareaMode and EditorMode.
RopeExt
An extension trait for Rope to provide additional utility methods.
SyntaxContextProvider
Answers syntax context for editing decisions (pairing, skip, indent).

Functions§

set_language_config
Replace a language’s editing configuration for this application. Existing editors read the replacement on their next edit. Aliases follow the installed language provider; Base alone treats names case-insensitively. This does not change auto_close or smart_indent preferences.
set_language_provider
Install the application’s language service. Existing editors use the new service on their next editing operation, without waiting for a render. Registered configurations are retained and resolved through the new service.

Type Aliases§

DiagnosticRelatedInformation
DiagnosticTag
EditorState
State for source-code editing.
FoldIconRenderer
InputHighlighterFactory
InputState
State for a single-line text input.
RelatedInformation
SharedHighlightStyleResolver
ShowDocumentHandler
Host hook to show a document when following an LSP location (Go to Definition), modeled after the window/showDocument request.
TextareaState
State for editing ordinary multi-line text.