mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Parameter inlay hint separate from variable type inlay? #2876
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
This commit is contained in:
parent
0714a065d5
commit
e98aff109a
13 changed files with 155 additions and 34 deletions
|
@ -44,6 +44,7 @@ mod marks;
|
|||
#[cfg(test)]
|
||||
mod test_utils;
|
||||
|
||||
use ra_project_model::InlayHintOptions;
|
||||
use std::sync::Arc;
|
||||
|
||||
use ra_cfg::CfgOptions;
|
||||
|
@ -318,9 +319,9 @@ impl Analysis {
|
|||
pub fn inlay_hints(
|
||||
&self,
|
||||
file_id: FileId,
|
||||
max_inlay_hint_length: Option<usize>,
|
||||
inlay_hint_opts: &InlayHintOptions,
|
||||
) -> 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