Skip to content

Formatting via just --dump overwrites edits when called as a pre-save hook #81

@djanderson

Description

@djanderson

@terror, unfortunately I believe that PR #77 may have lead to a bug.

I'm using Zed and this lsp via sectore/zed-just-ls. It seems that format_document is called as a pre-save hook by default, I have not modified any lsp configuration.

When I edit a Justfile, the edits are held in memory and were previously passed to format_document, but now the file contents are read off disk.

This means that if format is configured as a pre-save hook, it deletes your edits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions