pub struct Config {
pub tab_size: usize,
pub indent_guides: bool,
pub indent_style: IndentStyle,
pub indent_detect: bool,
pub auto_format: bool,
}Fields§
§tab_size: usizeIndent unit width in spaces (>>, auto-indent, tab display).
A document’s detected indent overrides this per buffer when
indent_detect is on.
indent_guides: boolIndent guides (dim │ per level) on/off.
indent_style: IndentStyleWhat auto-indent, >> and the Tab key emit.
indent_detect: boolInfer an opened document’s indent (unit and width) from its content; the config above is the fallback and the new-file default.
auto_format: boolFormat through the language server before writing (helix’s auto-format). A formatter failure never blocks the write.
Implementations§
Source§impl Config
impl Config
Sourcepub fn print_knobs(&self)
pub fn print_knobs(&self)
strop config: the knobs with live values (KNOBS is the data
source; this is its first consumer — the settings popup is next).
Sourcepub fn load() -> (Self, Option<String>)
pub fn load() -> (Self, Option<String>)
Load the user config; errors are returned as a message for the statusline — the editor always starts with defaults (0005 §2).
pub fn indent(&self) -> String
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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