aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/config.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs1
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs6
-rw-r--r--crates/ra_lsp_server/src/world.rs1
4 files changed, 1 insertions, 9 deletions
diff --git a/crates/ra_lsp_server/src/config.rs b/crates/ra_lsp_server/src/config.rs
index a916c5fd6..67942aa41 100644
--- a/crates/ra_lsp_server/src/config.rs
+++ b/crates/ra_lsp_server/src/config.rs
@@ -31,7 +31,6 @@ pub struct ServerConfig {
31 pub lru_capacity: Option<usize>, 31 pub lru_capacity: Option<usize>,
32 32
33 pub max_inlay_hint_length: Option<usize>, 33 pub max_inlay_hint_length: Option<usize>,
34 pub show_default_types_in_inlay_hints: bool,
35 34
36 /// For internal usage to make integrated tests faster. 35 /// For internal usage to make integrated tests faster.
37 #[serde(deserialize_with = "nullable_bool_true")] 36 #[serde(deserialize_with = "nullable_bool_true")]
@@ -52,7 +51,6 @@ impl Default for ServerConfig {
52 use_client_watching: false, 51 use_client_watching: false,
53 lru_capacity: None, 52 lru_capacity: None,
54 max_inlay_hint_length: None, 53 max_inlay_hint_length: None,
55 show_default_types_in_inlay_hints: false,
56 with_sysroot: true, 54 with_sysroot: true,
57 feature_flags: FxHashMap::default(), 55 feature_flags: FxHashMap::default(),
58 cargo_features: Default::default(), 56 cargo_features: Default::default(),
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 01fde3b2d..965e7c53c 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -125,7 +125,6 @@ pub fn main_loop(
125 .and_then(|it| it.line_folding_only) 125 .and_then(|it| it.line_folding_only)
126 .unwrap_or(false), 126 .unwrap_or(false),
127 max_inlay_hint_length: config.max_inlay_hint_length, 127 max_inlay_hint_length: config.max_inlay_hint_length,
128 show_default_types_in_inlay_hints: config.show_default_types_in_inlay_hints,
129 } 128 }
130 }; 129 };
131 130
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index 9069d1f1d..5b64b27cd 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -895,11 +895,7 @@ pub fn handle_inlay_hints(
895 let analysis = world.analysis(); 895 let analysis = world.analysis();
896 let line_index = analysis.file_line_index(file_id)?; 896 let line_index = analysis.file_line_index(file_id)?;
897 Ok(analysis 897 Ok(analysis
898 .inlay_hints( 898 .inlay_hints(file_id, world.options.max_inlay_hint_length)?
899 file_id,
900 world.options.max_inlay_hint_length,
901 world.options.show_default_types_in_inlay_hints,
902 )?
903 .into_iter() 899 .into_iter()
904 .map(|api_type| InlayHint { 900 .map(|api_type| InlayHint {
905 label: api_type.label.to_string(), 901 label: api_type.label.to_string(),
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs
index 0b6eefcbc..16cc11e8c 100644
--- a/crates/ra_lsp_server/src/world.rs
+++ b/crates/ra_lsp_server/src/world.rs
@@ -31,7 +31,6 @@ pub struct Options {
31 pub supports_location_link: bool, 31 pub supports_location_link: bool,
32 pub line_folding_only: bool, 32 pub line_folding_only: bool,
33 pub max_inlay_hint_length: Option<usize>, 33 pub max_inlay_hint_length: Option<usize>,
34 pub show_default_types_in_inlay_hints: bool,
35} 34}
36 35
37/// `WorldState` is the primary mutable state of the language server 36/// `WorldState` is the primary mutable state of the language server