mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-23 20:56:42 +00:00
refactor: rename local variables and some types (#1023)
* fix: naming * refactor: rename local variables and some types
This commit is contained in:
parent
ad0c1e8aca
commit
be1d659719
52 changed files with 805 additions and 787 deletions
|
|
@ -139,19 +139,19 @@ impl ReferencesWorker<'_> {
|
|||
|
||||
fn push_idents<'b>(
|
||||
&mut self,
|
||||
s: &Source,
|
||||
u: &Url,
|
||||
src: &Source,
|
||||
url: &Url,
|
||||
idents: impl Iterator<Item = (&'b Span, &'b Interned<RefExpr>)>,
|
||||
) {
|
||||
self.push_ranges(s, u, idents.map(|e| e.0));
|
||||
self.push_ranges(src, url, idents.map(|(span, _)| span));
|
||||
}
|
||||
|
||||
fn push_ranges<'b>(&mut self, s: &Source, u: &Url, rs: impl Iterator<Item = &'b Span>) {
|
||||
self.references.extend(rs.filter_map(|span| {
|
||||
fn push_ranges<'b>(&mut self, src: &Source, url: &Url, spans: impl Iterator<Item = &'b Span>) {
|
||||
self.references.extend(spans.filter_map(|span| {
|
||||
// todo: this is not necessary a name span
|
||||
let range = self.ctx.ctx.to_lsp_range(s.range(*span)?, s);
|
||||
let range = self.ctx.ctx.to_lsp_range(src.range(*span)?, src);
|
||||
Some(LspLocation {
|
||||
uri: u.clone(),
|
||||
uri: url.clone(),
|
||||
range,
|
||||
})
|
||||
}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue