blob: 4706e3964e2c4abe21d695488b4b93f6f80d7995 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use base_db::Workspace;
use crate::util::{from_proto, to_proto};
pub fn find_all(
workspace: &Workspace,
params: lsp_types::DocumentHighlightParams,
) -> Option<Vec<lsp_types::DocumentHighlight>> {
let params = from_proto::highlight_params(workspace, params)?;
let results = highlights::find_all(¶ms);
let results = results.into_iter().filter_map(|result| {
to_proto::document_highlight(result, ¶ms.feature.document.line_index)
});
Some(results.collect())
}
|