fs_watcher_lsp

Crates.iofs_watcher_lsp
lib.rsfs_watcher_lsp
version0.1.0
created_at2025-11-22 22:19:33.854419+00
updated_at2025-11-22 22:19:33.854419+00
descriptionLittle file system watcher LSP to reload your editor.
homepage
repositoryhttps://codeberg.org/Zentropivity/fs_watcher_lsp
max_upload_size
id1945820
size45,086
Zentropivity (Zentropivity)

documentation

README

fs_watcher_lsp

Little file system watcher LSP to reload your editor.

Usage

Make your editor talk to it on LSP using stdin/stdout.
Here is how that might be done with helix in languages.toml:

# define the language server
[language-server.fs_watcher_lsp]
command = "fs_watcher_lsp" # maybe use the path where it is installed
args = []

# then add it to any language definitions' language-servers you want to auto-reload
[[language]]
name = "txt"
scope = "source.txt"
injection-regex = "txt"
file-types = ["txt"]
language-servers = ["fs_watcher_lsp"]

# Note: in helix, the auto-reloads are part of the undo-redo system

How to install

Easiest way is through cargo, run: cargo install fs_watcher_lsp. Or you can just build it with cargo.

Why though?

I wanted to make an SVG editor that may open the file as text in my favorite text editor (helix), but that had no auto-reload support and it seemed simplest to add it with this workaround.

License

This application is free, open source and permissively licensed! Except where noted (below and/or in individual files), all code in this repository is dual-licensed under either:

at your option. This means you can select the license you prefer! This dual-licensing approach is the de-facto standard in the Rust ecosystem and there are very good reasons to include both.

Your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 0

cargo fmt