summaryrefslogtreecommitdiff
path: root/support/texlab/src/features/highlight.rs
blob: 386018f353d20cdaededa31800f585555eb9c6c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod label;

use cancellation::CancellationToken;
use lsp_types::{DocumentHighlight, DocumentHighlightParams};

use self::label::find_label_highlights;

use super::{cursor::CursorContext, FeatureRequest};

pub fn find_document_highlights(
    request: FeatureRequest<DocumentHighlightParams>,
    cancellation_token: &CancellationToken,
) -> Option<Vec<DocumentHighlight>> {
    let context = CursorContext::new(request);
    find_label_highlights(&context, cancellation_token)
}