]> git.lizzy.rs Git - rust.git/blob - src/tools/rust-analyzer/crates/ide-assists/src/assist_config.rs
Rollup merge of #103996 - SUPERCILEX:docs, r=RalfJung
[rust.git] / src / tools / rust-analyzer / crates / ide-assists / src / assist_config.rs
1 //! Settings for tweaking assists.
2 //!
3 //! The fun thing here is `SnippetCap` -- this type can only be created in this
4 //! module, and we use to statically check that we only produce snippet
5 //! assists if we are allowed to.
6
7 use ide_db::{imports::insert_use::InsertUseConfig, SnippetCap};
8
9 use crate::AssistKind;
10
11 #[derive(Clone, Debug, PartialEq, Eq)]
12 pub struct AssistConfig {
13     pub snippet_cap: Option<SnippetCap>,
14     pub allowed: Option<Vec<AssistKind>>,
15     pub insert_use: InsertUseConfig,
16     pub prefer_no_std: bool,
17     pub assist_emit_must_use: bool,
18 }