plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.imports.granularity.enforce

Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file.

Type: null or boolean

Default: null

Plugin default: false

plugins.rustaceanvim.settings.server.default_settings.rust-analyzer.imports.granularity.group

How imports should be grouped into use statements.

Values:

  • preserve: Do not change the granularity of any imports and preserve the original structure written by the developer.
  • crate: Merge imports from the same crate into a single use statement. Conversely, imports from different crates are split into separate statements.
  • module: Merge imports from the same module into a single use statement. Conversely, imports from different modules are split into separate statements.
  • item: Flatten imports so that each has its own use statement.
  • one: Merge all imports into a single use statement as long as they have the same visibility and attributes.

Type: null or one of “preserve”, “crate”, “module”, “item”, “one”

Default: null

Plugin default: "crate"