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

Try to keep track of the correct locations whilst editing files #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mpickering
Copy link

@mpickering mpickering commented Feb 23, 2019

The language server is a bit useless as soon as you start editing files as all the locations are immediately incorrect. This means all the hovers are in the wrong place and so on.

This patch tries to work out the correct mapping from the old to new locations so that you can edit a file and the ranges are resolved correctly.

The logic is based on a Haskell implementation of the same idea by Luke Lau (@bubba) and Zubin Duggal (@wz1000)

@msftclas
Copy link

msftclas commented Feb 23, 2019

CLA assistant check
All CLA requirements met.

@dbaeumer
Copy link
Member

dbaeumer commented Mar 25, 2019

@mpickering this is actually an interesting idea. The only problem I see with it is that it might be totally unclear when presented information is actually out of date. Can you elabortate a little more in which use cases something like this is useful? Our current use case for LSIF is more browsing of read only code.

@mpickering
Copy link
Author

I was originally using LSIF for a project which couldn't be used with a language server but I could generate LSIF files for. It is very big so most of the files are never modified so LSIF files generally worked fine for browsing those files and finding references. When editing a file I realised that it made everything in the wrong place even though 90% of the file was not modified so this change makes the LSIF files work still for the rest of the file which hasn't been modified.

In recent developments I made said project work with a language server so I have less use for this but I can still imagine using LSIF in a code review situation to make some changes to the patch and suggest them to the author.

@dbaeumer
Copy link
Member

@mpickering thanks for the clarification.

Base automatically changed from master to main March 2, 2021 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants