pub struct Behavior {
pub pause_per_backspace_ms: u32,
pub reset_keys: ResetKeys,
pub review_starts_in_vim: bool,
pub fallback_to_languagetool: bool,
pub definitions: DefinitionSource,
}Expand description
Behavior knobs.
Fields§
§pause_per_backspace_ms: u32Wait time per backspace, applied as a single pause between
the backspace burst and the replacement-text burst. Total
pause = pause_per_backspace_ms × backspace count.
The only emit-side knob most users need. The reason behind
it: Wayland delivers all dispatched backspaces reliably, but
the focused app drains them through its own event loop at
its own pace — if the daemon’s next wtype (the typing
burst) starts before the app has finished applying the
backspaces, those text events queue behind the still-
processing deletes and visually leave a prefix of the
original on screen. This pause covers that drain time.
Raise it if you still see leftover prefix characters.
reset_keys: ResetKeysWhich keys clear the per-window typing buffer when pressed. Useful trade-off: a reset is the safest response to a key we can’t precisely track (so fix-word never lands at the wrong spot), but disabling some resets lets the buffer survive an autocomplete (Tab), a mode switch (Esc), and so on so a subsequent fix-word can still operate on the already-typed text.
review_starts_in_vim: boolOpen the review popup straight into vim mode instead of the
word-edit (Tab) mode. Ctrl+E still toggles between the two — so
when this is on, Ctrl+E flips to word-edit mode.
fallback_to_languagetool: boolWhen a fix routed to the LLM can’t run — no API key, an unsupported/unwired backend, or the network call itself fails — try a configured LanguageTool server before dropping to the offline Spellbook. Only has an effect when LanguageTool is enabled with a URL; otherwise the fix falls straight through to Spellbook either way. On by default so a configured LanguageTool is preferred over the offline dictionary.
definitions: DefinitionSourceSource for the per-option word definitions under the review popup’s suggestion dropdown. Defaults to the bundled offline dictionary; can be turned off or pointed at an online API.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Behavior
impl<'de> Deserialize<'de> for Behavior
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Behavior
impl StructuralPartialEq for Behavior
Auto Trait Implementations§
impl Freeze for Behavior
impl RefUnwindSafe for Behavior
impl Send for Behavior
impl Sync for Behavior
impl Unpin for Behavior
impl UnsafeUnpin for Behavior
impl UnwindSafe for Behavior
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.