From e98aff109a1c4bda6a05f16981898425c302aa0c Mon Sep 17 00:00:00 2001 From: Steffen Lyngbaek Date: Tue, 10 Mar 2020 00:55:46 -0700 Subject: 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 --- crates/ra_ide/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/lib.rs') diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index 9f45003d3..8b1292a41 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs @@ -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, + inlay_hint_opts: &InlayHintOptions, ) -> Cancelable> { - 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. -- cgit v1.2.3