Skip to main content

EditorState

Type Alias EditorState 

Source
pub type EditorState = InputBaseState<EditorMode>;
Expand description

State for source-code editing.

This is the shared editing engine in its code-editor kind. Languages, line numbers, folding, indent guides, diagnostics, decorations, and the LSP providers exist on this kind only, so an ordinary input or textarea never exposes them.

Aliased Type§

pub struct EditorState { /* private fields */ }

Implementations§

Source§

impl EditorState

Source

pub fn lsp(&self) -> &Lsp

The LSP providers and their cached results.

This exists on the editor alone: an ordinary input or textarea has no language server, and no field to reach one through.

Source

pub fn lsp_mut(&mut self) -> &mut Lsp

The LSP providers, mutably. Configure the providers through this.