pub struct VsCodeConfig {
pub severity: Option<String>,
pub target: Option<String>,
pub tools: Option<Vec<String>>,
pub rules: Option<VsCodeRules>,
pub versions: Option<VsCodeVersions>,
pub specs: Option<VsCodeSpecs>,
pub locale: Option<Option<String>>,
pub files: Option<VsCodeFiles>,
}Expand description
VS Code configuration received from workspace/didChangeConfiguration.
This structure matches the LspConfig interface in extension.ts. All fields are optional to support partial configuration updates.
Fields§
§severity: Option<String>Minimum severity level for diagnostics
target: Option<String>Target tool for validation (deprecated)
tools: Option<Vec<String>>Tools to validate for
rules: Option<VsCodeRules>Rule category toggles
versions: Option<VsCodeVersions>Tool version pins
specs: Option<VsCodeSpecs>Spec revision pins
locale: Option<Option<String>>Output locale for translated messages (e.g., “en”, “es”, “zh-CN”)
Uses Option<Option
- None = field not in JSON (preserve existing locale)
- Some(None) = field in JSON as null (revert to auto-detection)
- Some(Some(v)) = field in JSON with value (set locale to v)
files: Option<VsCodeFiles>File inclusion/exclusion configuration
Implementations§
Source§impl VsCodeConfig
impl VsCodeConfig
Sourcepub fn merge_into_lint_config(&self, config: &mut LintConfig)
pub fn merge_into_lint_config(&self, config: &mut LintConfig)
Merge VS Code settings into a LintConfig.
Only non-None values are applied, preserving any existing config (e.g., from .agnix.toml). This allows VS Code settings to override file-based config while keeping unspecified options unchanged.
§Priority
VS Code settings take priority over .agnix.toml values.
Trait Implementations§
Source§impl Clone for VsCodeConfig
impl Clone for VsCodeConfig
Source§fn clone(&self) -> VsCodeConfig
fn clone(&self) -> VsCodeConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VsCodeConfig
impl Debug for VsCodeConfig
Source§impl Default for VsCodeConfig
impl Default for VsCodeConfig
Source§fn default() -> VsCodeConfig
fn default() -> VsCodeConfig
Source§impl<'de> Deserialize<'de> for VsCodeConfigwhere
VsCodeConfig: Default,
impl<'de> Deserialize<'de> for VsCodeConfigwhere
VsCodeConfig: 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>,
Auto Trait Implementations§
impl Freeze for VsCodeConfig
impl RefUnwindSafe for VsCodeConfig
impl Send for VsCodeConfig
impl Sync for VsCodeConfig
impl Unpin for VsCodeConfig
impl UnsafeUnpin for VsCodeConfig
impl UnwindSafe for VsCodeConfig
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,
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>
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