Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loc instances in DocumentEdits and TextEdits do not work unless line/column info is also present #503

Open
jurgenvinju opened this issue Nov 5, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@jurgenvinju
Copy link
Member

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 and insertBefore 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.

@jurgenvinju jurgenvinju added bug Something isn't working enhancement New feature or request labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants