pub struct AutoPairsConfig {
pub enabled: bool,
pub pairs: Vec<AutoPair>,
pub wrap_selection: bool,
pub skip_over_closing: bool,
pub delete_pair: bool,
}Expand description
Auto-pairs configuration (auto-close, wrap selection, skip-over, delete-pair).
Notes:
- This mirrors
editor-core’s auto-pairs behavior, but stays in this crate to avoid a cyclic dependency (editor-coredepends oneditor-core-lang).
Fields§
§enabled: boolMaster enable switch for auto-pairs behaviors.
pairs: Vec<AutoPair>Configured delimiter pairs (order matters when overlapping; first match wins).
wrap_selection: boolWhen typing an opening delimiter over a non-empty selection, wrap the selection.
skip_over_closing: boolWhen typing a closing delimiter and the next character matches, skip over it instead of inserting.
delete_pair: boolWhen backspacing/deleting adjacent matching delimiters, delete both.
Trait Implementations§
Source§impl Clone for AutoPairsConfig
impl Clone for AutoPairsConfig
Source§fn clone(&self) -> AutoPairsConfig
fn clone(&self) -> AutoPairsConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AutoPairsConfig
impl Debug for AutoPairsConfig
Source§impl Default for AutoPairsConfig
impl Default for AutoPairsConfig
impl Eq for AutoPairsConfig
Source§impl PartialEq for AutoPairsConfig
impl PartialEq for AutoPairsConfig
Source§fn eq(&self, other: &AutoPairsConfig) -> bool
fn eq(&self, other: &AutoPairsConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AutoPairsConfig
Auto Trait Implementations§
impl Freeze for AutoPairsConfig
impl RefUnwindSafe for AutoPairsConfig
impl Send for AutoPairsConfig
impl Sync for AutoPairsConfig
impl Unpin for AutoPairsConfig
impl UnsafeUnpin for AutoPairsConfig
impl UnwindSafe for AutoPairsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more