pub struct PerLanguageOverrides {
pub sources: Option<Vec<SourceId>>,
pub auto_trigger: Option<bool>,
pub auto_insert_single: Option<bool>,
pub suppress_in: Option<Vec<String>>,
}Expand description
Per-language overrides for the insert-completion popup. Each
field is Option so a TOML override at
[completion.per-language.<lang>] can flip exactly the keys
it cares about; unset fields fall back to the global typed
option (or, for sources, “every enabled source contributes”).
The host (App) layers a TOML override on top of the spec-
driven defaults from per_language_defaults; the
effective-config resolver in the host walks
per_language -> global option -> hardcoded fallback for
every read.
Fields§
§sources: Option<Vec<SourceId>>Subset of source ids that contribute for this language.
None = every enabled source contributes (the global
default). The producer layer skips emit + LSP fan-out
for sources outside this list.
auto_trigger: Option<bool>Whether typing identifier chars opens the popup
automatically. None = inherit
completion.auto_trigger. Plumbed today; auto-trigger
firing itself lands later.
auto_insert_single: Option<bool>Whether a single-candidate popup auto-accepts. None =
inherit completion.auto_insert_single.
suppress_in: Option<Vec<String>>Tree-sitter scope strings (e.g. "string", "comment")
where the popup should not fire. None = inherit; empty
list = “fire everywhere.” Plumbed today; scope-detect
enforcement lands with the tree-sitter scope queries
slice.
Implementations§
Source§impl PerLanguageOverrides
impl PerLanguageOverrides
Sourcepub fn merge(&mut self, other: PerLanguageOverrides)
pub fn merge(&mut self, other: PerLanguageOverrides)
Layer other on top of self: every Some field in
other wins; None fields preserve self’s value.
Used when a TOML override merges onto the spec defaults.
Trait Implementations§
Source§impl Clone for PerLanguageOverrides
impl Clone for PerLanguageOverrides
Source§fn clone(&self) -> PerLanguageOverrides
fn clone(&self) -> PerLanguageOverrides
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more