diff options
Diffstat (limited to 'support/texlab/src/features/hover/field.rs')
-rw-r--r-- | support/texlab/src/features/hover/field.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/support/texlab/src/features/hover/field.rs b/support/texlab/src/features/hover/field.rs index 6102bd6b68..48193997d6 100644 --- a/support/texlab/src/features/hover/field.rs +++ b/support/texlab/src/features/hover/field.rs @@ -1,14 +1,17 @@ -use lsp_types::{HoverParams, MarkupKind}; +use lsp_types::MarkupKind; use rowan::ast::AstNode; -use crate::{features::cursor::CursorContext, syntax::bibtex, LANGUAGE_DATA}; +use crate::{ + syntax::bibtex, + util::{cursor::CursorContext, lang_data::LANGUAGE_DATA}, +}; use super::HoverResult; -pub(super) fn find_field_hover(context: &CursorContext<HoverParams>) -> Option<HoverResult> { +pub(super) fn find_hover(context: &CursorContext) -> Option<HoverResult> { let name = context .cursor - .as_bibtex() + .as_bib() .filter(|token| token.kind() == bibtex::NAME)?; bibtex::Field::cast(name.parent()?)?; |