Add option to skip trivial cases

This commit is contained in:
Lukas Wirth 2022-03-19 19:01:19 +01:00
parent 45756c823f
commit 7ab0aaa82a
6 changed files with 178 additions and 49 deletions

View file

@ -12,11 +12,14 @@ use ide_db::{
use rustc_hash::FxHashSet;
use syntax::{AstNode, SyntaxKind::*, SyntaxToken, TextRange, T};
use crate::moniker::{crate_for_file, def_to_moniker, MonikerResult};
use crate::{
hover::hover_for_definition, Analysis, Fold, HoverConfig, HoverDocFormat, HoverResult,
InlayHint, InlayHintsConfig, TryToNav,
};
use crate::{
moniker::{crate_for_file, def_to_moniker, MonikerResult},
LifetimeElisionHints,
};
/// A static representation of fully analyzed source code.
///
@ -110,7 +113,7 @@ impl StaticIndex<'_> {
parameter_hints: true,
chaining_hints: true,
closure_return_type_hints: true,
lifetime_elision_hints: false,
lifetime_elision_hints: LifetimeElisionHints::Never,
hide_named_constructor_hints: false,
param_names_for_lifetime_elision_hints: false,
max_length: Some(25),