File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -725,10 +725,17 @@ private def findCompletionInfoAt?
725
725
| none
726
726
let some stack := info.stx.findStack? (·.getRange?.any (·.contains hoverPos (includeStop := true )))
727
727
| none
728
- let some (stx, id, danglingDot) := stack.findSome? fun (stx, _) =>
728
+ let stack := stack.dropWhile fun (stx, _) => !(stx matches `($_:ident) || stx matches `($_:ident.))
729
+ let some (stx, _) := stack.head?
730
+ | none
731
+ let isDotIdCompletion := stack.any fun (stx, _) => stx matches `(.$_:ident)
732
+ if isDotIdCompletion then
733
+ -- An identifier completion is never useful in a dotId completion context.
734
+ none
735
+ let some (id, danglingDot) :=
729
736
match stx with
730
- | `($id:ident) => some (stx, id.getId, false )
731
- | `($id:ident.) => some (stx, id.getId, true )
737
+ | `($id:ident) => some (id.getId, false )
738
+ | `($id:ident.) => some (id.getId, true )
732
739
| _ => none
733
740
| none
734
741
let tailPos := stx.getTailPos?.get!
You can’t perform that action at this time.
0 commit comments