loc
instances in DocumentEdits and TextEdits do not work unless line/column info is also present
#503
Labels
loc
instances in DocumentEdits and TextEdits do not work unless line/column info is also present
#503
Describe the bug
On the Rascal side it is quite normal to pass
loc
with only offset and length information, while the optional line/column start and end are missing.With the new CodeAction features for DSLs and Rascal this becomes more pressing, since these code actions use locs a lot and also manipulate locs to produce
insertAfter
andinsertBefore
operations.A feature enhancement would be that if column/line info is missing on a loc while it is being transformed to an LSP Positiion instance, we fill in the line and column automatically by looking in the current state of the document on which line/column the offset starts and offset+length ends.
@DavyLandman I'm tagging you because this is your expertise.
The text was updated successfully, but these errors were encountered: