Performs findLeafNodeAtOffset with a minor difference: When encountering a character that matches the nameRegexp argument,
it will instead return the leaf node at the offset - 1 position.
For LSP services, users expect that the declaration of an element is available if the cursor is directly after the element.
Performs
findLeafNodeAtOffset
with a minor difference: When encountering a character that matches thenameRegexp
argument, it will instead return the leaf node at theoffset - 1
position.For LSP services, users expect that the declaration of an element is available if the cursor is directly after the element.