-
-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hello! I have a feature request for v2.
Background:
TextDocument.offset_at_position(), already implemented here, is a nice way to get the character index of document.source given the client's types.Position struct.
Request:
It would be nice to also have the reverse lookup. Given the character indexes of document.source, I would like a way to decode that into types.Position so that I easily specify in the response, for example, which text the inline completion will replace.
I couldn't find a way to do this by looking through the source code, so I implemented a hacky solution.
I also noticed the jedi-language-server application created their own approach as well here
tombh
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request