mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-23 20:56:42 +00:00
feat: prefer to select the previous token when cursor is before a marker (#1175)
* feat: prefer to select the previous token when cursor is before a marker * test: update snapshot
This commit is contained in:
parent
0aafee1d13
commit
faf807edb2
6 changed files with 26 additions and 13 deletions
|
|
@ -31,7 +31,7 @@ impl StatefulRequest for ReferencesRequest {
|
|||
doc: Option<VersionedDocument>,
|
||||
) -> Option<Self::Response> {
|
||||
let source = ctx.source_by_path(&self.path).ok()?;
|
||||
let syntax = ctx.classify_pos(&source, self.position, 1)?;
|
||||
let syntax = ctx.classify_for_decl(&source, self.position)?;
|
||||
|
||||
let locations = find_references(ctx, &source, doc.as_ref(), syntax)?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue