aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-01-15 10:24:51 +0000
committerGitHub <[email protected]>2020-01-15 10:24:51 +0000
commit876f92d547af5f39170350f3995647ec934f590b (patch)
treeb2dfc9053f910d1f64f3d899628cdaf482953aee /crates/ra_lsp_server/src
parentbc8be6bcdb7ea9b23cc6723769e6071a705cb88b (diff)
parentd854ad8f279e5a3a4b3908bf5b0afdaba3d37bc9 (diff)
Merge #2843
2843: Add inlay parameter name hints for call expr r=matklad a=imtsuki This patch adds Intellij-like parameter name hints for literal values in function calls. <img width="624" alt="Screenshot" src="https://user-images.githubusercontent.com/8423594/72366533-68d7f800-3735-11ea-9279-cf193ca8ca2f.png"> Signed-off-by: imtsuki <[email protected]> Co-authored-by: imtsuki <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs1
-rw-r--r--crates/ra_lsp_server/src/req.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index d5a8bbe4d..f2db575ea 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -953,6 +953,7 @@ pub fn handle_inlay_hints(
953 range: api_type.range.conv_with(&line_index), 953 range: api_type.range.conv_with(&line_index),
954 kind: match api_type.kind { 954 kind: match api_type.kind {
955 ra_ide::InlayKind::TypeHint => InlayKind::TypeHint, 955 ra_ide::InlayKind::TypeHint => InlayKind::TypeHint,
956 ra_ide::InlayKind::ParameterHint => InlayKind::ParameterHint,
956 }, 957 },
957 }) 958 })
958 .collect()) 959 .collect())
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs
index 8098ff31d..dc327f53d 100644
--- a/crates/ra_lsp_server/src/req.rs
+++ b/crates/ra_lsp_server/src/req.rs
@@ -197,6 +197,7 @@ pub struct InlayHintsParams {
197#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] 197#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)]
198pub enum InlayKind { 198pub enum InlayKind {
199 TypeHint, 199 TypeHint,
200 ParameterHint,
200} 201}
201 202
202#[derive(Debug, Deserialize, Serialize)] 203#[derive(Debug, Deserialize, Serialize)]