aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/hover.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 23f2b48b4..7b9336d38 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -181,7 +181,8 @@ pub(crate) fn hover(
181 } 181 }
182 } 182 }
183 183
184 if let res @ Some(_) = hover_for_keyword(&sema, links_in_hover, markdown, &token) { 184 if let res @ Some(_) = hover_for_keyword(&sema, links_in_hover, markdown, documentation, &token)
185 {
185 return res; 186 return res;
186 } 187 }
187 188
@@ -504,9 +505,10 @@ fn hover_for_keyword(
504 sema: &hir::Semantics<RootDatabase>, 505 sema: &hir::Semantics<RootDatabase>,
505 links_in_hover: bool, 506 links_in_hover: bool,
506 markdown: bool, 507 markdown: bool,
508 documentation: bool,
507 token: &SyntaxToken, 509 token: &SyntaxToken,
508) -> Option<RangeInfo<HoverResult>> { 510) -> Option<RangeInfo<HoverResult>> {
509 if !token.kind().is_keyword() { 511 if !token.kind().is_keyword() || documentation {
510 return None; 512 return None;
511 } 513 }
512 let famous_defs = FamousDefs(sema, sema.scope(&token.parent()?).krate()); 514 let famous_defs = FamousDefs(sema, sema.scope(&token.parent()?).krate());