summaryrefslogtreecommitdiff
path: root/support/texlab/src/features/semantic.rs
blob: 8dd2674601c31f6c58b02e66613c13b8396784a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mod bibtex;
pub mod legend;

use cancellation::CancellationToken;
use lsp_types::{SemanticTokens, SemanticTokensRangeParams};

use self::bibtex::find_bibtex_semantic_tokens_range;

use super::FeatureRequest;

pub fn find_semantic_tokens_range(
    request: FeatureRequest<SemanticTokensRangeParams>,
    cancellation_token: &CancellationToken,
) -> Option<SemanticTokens> {
    let mut data = Vec::new();
    find_bibtex_semantic_tokens_range(&request, &mut data, cancellation_token);
    Some(SemanticTokens {
        result_id: None,
        data,
    })
}