Skip to content

Handle refresh requests with unsaved changes #36

@Lysxia

Description

@Lysxia

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions