pub struct HunspellConfig {
pub enabled: bool,
pub languages: Vec<String>,
pub dictionary_paths: HashMap<String, String>,
pub search_paths: Vec<String>,
pub auto_install: bool,
}Expand description
Hunspell: spelling for the languages the other engines do not read.
engines:
hunspell:
enabled: true
languages: ["he", "la"]
dictionary_paths:
la: /opt/dictionaries/latinFields§
§enabled: boolOff by default, like every engine that needs something installed.
languages: Vec<String>Languages to check with Hunspell, as BCP-47 tags.
Naming them ahead of time is what lets a pack be fetched before it is needed rather than mid-document, and what keeps this engine to the gaps – leave English out and Harper keeps it. Empty means any language with a pack behind it, which is the discovery mode and not the tidy one.
dictionary_paths: HashMap<String, String>Per-language override: a directory, an .aff/.dic stem, or either
file of the pair. Beats every search path, so a pinned dictionary is
definitely the one in use.
search_paths: Vec<String>Extra directories to search, before the platform’s own.
auto_install: boolFetch a missing pack without being asked.
Off by default: a dictionary is a third-party download under its own licence – Hspell is AGPL-3.0, the Latin pack GPL – and that is a decision to put to the user rather than to make for them.
Trait Implementations§
Source§impl Clone for HunspellConfig
impl Clone for HunspellConfig
Source§fn clone(&self) -> HunspellConfig
fn clone(&self) -> HunspellConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HunspellConfig
impl Debug for HunspellConfig
Source§impl Default for HunspellConfig
impl Default for HunspellConfig
Source§fn default() -> HunspellConfig
fn default() -> HunspellConfig
Source§impl<'de> Deserialize<'de> for HunspellConfig
impl<'de> Deserialize<'de> for HunspellConfig
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>,
Source§impl EngineToggle for HunspellConfig
impl EngineToggle for HunspellConfig
Auto Trait Implementations§
impl Freeze for HunspellConfig
impl RefUnwindSafe for HunspellConfig
impl Send for HunspellConfig
impl Sync for HunspellConfig
impl Unpin for HunspellConfig
impl UnsafeUnpin for HunspellConfig
impl UnwindSafe for HunspellConfig
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<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: Sized + AsFilelike,
self file descriptor. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more