pub struct LspRuleSettings {
pub line_length: Option<usize>,
pub disable: Option<Vec<String>>,
pub enable: Option<Vec<String>>,
pub rules: HashMap<String, Value>,
}Expand description
Per-rule settings that can be passed via LSP initialization options
This struct mirrors the rule-specific settings from Config, allowing editors to configure rules without needing a config file.
Fields§
§line_length: Option<usize>Global line length for rules that use it
disable: Option<Vec<String>>Rules to disable
enable: Option<Vec<String>>Rules to enable
rules: HashMap<String, Value>Per-rule configuration (e.g., “MD013”: { “lineLength”: 120 })
Trait Implementations§
Source§impl Clone for LspRuleSettings
impl Clone for LspRuleSettings
Source§fn clone(&self) -> LspRuleSettings
fn clone(&self) -> LspRuleSettings
Returns a duplicate of the value. Read more
1.0.0 · 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 LspRuleSettings
impl Debug for LspRuleSettings
Source§impl Default for LspRuleSettings
impl Default for LspRuleSettings
Source§fn default() -> LspRuleSettings
fn default() -> LspRuleSettings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LspRuleSettingswhere
LspRuleSettings: Default,
impl<'de> Deserialize<'de> for LspRuleSettingswhere
LspRuleSettings: Default,
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 LspRuleSettings
impl RefUnwindSafe for LspRuleSettings
impl Send for LspRuleSettings
impl Sync for LspRuleSettings
impl Unpin for LspRuleSettings
impl UnwindSafe for LspRuleSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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>
Converts
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>
Converts
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