-
Notifications
You must be signed in to change notification settings - Fork 1
Description
VS Code refreshes code lenses every time you type, then the ranges sent by the language server are quickly out of sync. I asked the VS Code devs and they really want language servers to keep track of the code as it is in the editor instead of on the filesystem, there is no way around it.
My plan is to implement a structure to keep track of diffs and use that to shift code locations accordingly. This does not seem difficult.
Another solution would be to drop code lenses and avoid any feature that gets refreshed similarly. Luckily, diagnostics (squiggly underlines) and test runners (the buttons on the side), the most useful features for Creusot IDE, are up to the language server to refresh (although they are currently refreshed along with code lenses so they are currently affected by this issue).