Skip to main content

Module input

Module input 

Source

Modules§

language_config
Language editing configuration. Grammar resources live in highlighter.

Structs§

AutoClosingPair
An automatic closing pair and the syntax contexts in which insertion is disabled. Empty delimiters are ignored. Strings support delimiters such as /* and */.
Backspace
BracketPair
A structural pair, used for indentation and splitting Enter between delimiters.
BufferPoint
Position in the buffer (logical text).
CodeActionItem
CompletionMenuOptions
Display options for the LSP completion popover.
Copy
Cut
Delete
DeleteToBeginningOfLine
DeleteToEndOfLine
DeleteToNextWordEnd
DeleteToPreviousWordStart
DisplayMap
DisplayMap is the main interface for Editor/Input coordinate mapping.
DisplayPoint
Final display position (after soft-wrapping and folding).
Editor
A styled source-code editor.
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
IndentationRules
Language indentation patterns, using Rust’s regex syntax. Patterns are compiled by the caller, so invalid expressions are reported at setup. Applied on Enter: increase matches text before the caret; decrease matches text after it. This does not reformat existing lines or indentation on paste.
Input
A text input element bind to an InputState.
InputEdit
Parser-independent description of an incremental text replacement.
InputMode
A single-line text field: the mode of crate::input::InputState.
Lsp
LSP ServerCapabilities
MoveDown
MoveEnd
MoveHome
MoveLeft
MovePageDown
MovePageUp
MoveRight
MoveToEnd
MoveToEndOfLine
MoveToNextWord
MoveToPreviousWord
MoveToStart
MoveToStartOfLine
MoveUp
NumberInput
A number input element with increment and decrement buttons.
OtpInput
A One Time Password (OTP) input element.
OtpState
Stateful input and focus behavior for a fixed-length numeric one-time code.
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
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
A styled ordinary multi-line text field.
TextareaMode
Ordinary multi-line text: the mode of crate::input::TextareaState.
ToggleCodeActions
Tree
Undo

Enums§

AnyInputState
Any input-like state, regardless of which input element renders it.
InputContentType
Semantic content type for an Input.
InputEvent
MaskPattern
NumberInputEvent
NumberStep
Strategy used by numeric editors when stepping their value.
OtpEvent
A semantic notification from a one-time-code state.
StepAction
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
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.
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§

EditorState
State for source-code editing.
InputHighlighterFactory
InputState
State for a single-line text input.
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.