mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
internal: Expose snippet capability to diagnostic quickfixes
This commit is contained in:
parent
a8ad08b9b2
commit
4e6d908382
5 changed files with 13 additions and 6 deletions
|
@ -86,7 +86,7 @@ use ide_db::{
|
|||
label::Label,
|
||||
source_change::SourceChange,
|
||||
syntax_helpers::node_ext::parse_tt_as_comma_sep_paths,
|
||||
FxHashMap, FxHashSet, RootDatabase,
|
||||
FxHashMap, FxHashSet, RootDatabase, SnippetCap,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
use stdx::never;
|
||||
|
@ -229,6 +229,7 @@ pub struct DiagnosticsConfig {
|
|||
pub expr_fill_default: ExprFillDefaultMode,
|
||||
pub style_lints: bool,
|
||||
// FIXME: We may want to include a whole `AssistConfig` here
|
||||
pub snippet_cap: Option<SnippetCap>,
|
||||
pub insert_use: InsertUseConfig,
|
||||
pub prefer_no_std: bool,
|
||||
pub prefer_prelude: bool,
|
||||
|
@ -248,6 +249,7 @@ impl DiagnosticsConfig {
|
|||
disabled: Default::default(),
|
||||
expr_fill_default: Default::default(),
|
||||
style_lints: true,
|
||||
snippet_cap: SnippetCap::new(true),
|
||||
insert_use: InsertUseConfig {
|
||||
granularity: ImportGranularity::Preserve,
|
||||
enforce_granularity: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue