mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Merge #3543
3543: Parameter inlay hint separate from variable type inlay? #2876 r=matklad a=slyngbaek Add setting to allow enabling either type inlay hints or parameter inlay hints or both. Group the the max inlay hint length option into the object. - Add a new type for the inlayHint options. - Add tests to ensure the inlays don't happen on the server side Co-authored-by: Steffen Lyngbaek <steffenlyngbaek@gmail.com>
This commit is contained in:
commit
d98a5fab46
12 changed files with 150 additions and 43 deletions
|
@ -68,7 +68,7 @@ pub use crate::{
|
|||
expand_macro::ExpandedMacro,
|
||||
folding_ranges::{Fold, FoldKind},
|
||||
hover::HoverResult,
|
||||
inlay_hints::{InlayHint, InlayKind},
|
||||
inlay_hints::{InlayConfig, InlayHint, InlayKind},
|
||||
references::{Declaration, Reference, ReferenceAccess, ReferenceKind, ReferenceSearchResult},
|
||||
runnables::{Runnable, RunnableKind, TestId},
|
||||
source_change::{FileSystemEdit, SourceChange, SourceFileEdit},
|
||||
|
@ -319,9 +319,9 @@ impl Analysis {
|
|||
pub fn inlay_hints(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
max_inlay_hint_length: Option<usize>,
|
||||
inlay_hint_opts: &InlayConfig,
|
||||
) -> Cancelable<Vec<InlayHint>> {
|
||||
self.with_db(|db| inlay_hints::inlay_hints(db, file_id, max_inlay_hint_length))
|
||||
self.with_db(|db| inlay_hints::inlay_hints(db, file_id, inlay_hint_opts))
|
||||
}
|
||||
|
||||
/// Returns the set of folding ranges.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue