Skip to content

File watcher breaks when using Helix editor #2131

@LatjoLajbin

Description

@LatjoLajbin

Running d2 with filewatching breaks as soon as a save is performed, as helix creates and removes a backup file in case of crashes.

Found a similar report in the discord where the user was prompted to make a github issue, but I'm making this since I couldn't seem to find one.

OS: Windows
Shell: PowerShell
Editor: Helix
Installed via: Scoop (v0.6.7)

Wondering if this is related to the 16 milliseconds of event catching in d2cli/watch.go? It feels weird that it's receiving the file system event REMOVE and then immediately tries to ensure that it's being filewatched.

{11631616-B09F-4312-9FD5-925D3D9FCF3A}

There's a discussion in the helix repo regarding a similar issue in Hugo, where it was solved in Hugo by adding .bck files as file type exceptions.

helix-editor/helix#11715
gohugoio/hugo#12856

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions