Skip to main content

Crate banshee_config

Crate banshee_config 

Source
Expand description

Unified configuration for the banshee SQL toolchain.

BansheeConfig is the single struct threaded through the formatter, linter, completion engine and the generic LSP. It deserializes from a banshee.toml file whose schema is deliberately decoupled from the internal types of each crate, so the file format can stay stable as internals evolve.

§Example banshee.toml

[format]
style = "sqlstyle"
keyword-case = "upper"
max-width = 100

[lint]
enabled = true
exclude = ["AM01"]

[lint.rules.CP01]
severity = "warning"

[database]
url-env = "DATABASE_URL"
schema = "public"

Structs§

BansheeConfig
Top-level configuration aggregating every subsystem’s settings.
CompletionSettings
Completion engine settings.
DatabaseSettings
Postgres connection configuration.
FormatSettings
Formatter settings: a base preset plus optional per-knob overrides.
LintSettings
Lint settings: global toggle, rule selection, and per-rule overrides.
PgFormatSettings
pgFormatter-only knobs, used when style = "pgformatter".
RuleSetting
Configuration for a single rule, keyed by its code (e.g. RF01).
TemplaterSettings
Placeholder templating settings.

Enums§

CasePolicy
Case policy for pgFormatter-specific knobs (supports capitalize/unchanged that the sqlstyle engine does not).
CommaStyle
Comma placement.
ConfigError
Errors raised while loading configuration.
IdentifierCase
Identifier case policy.
IndentUnit
Indentation unit.
KeywordCase
Keyword case policy.
PlaceholderStyle
The placeholder syntax used by the source. Selected via configuration; when unset, no templating runs.
SeverityLevel
Per-rule severity, including a disabled state.
StylePreset
Base formatter preset.

Constants§

CONFIG_FILE_NAME
Standard config file name discovered by BansheeConfig::discover.