A higher-level abstraction on top of async-lsp with good defaults and a streamlined integration with tokio for stdio / tcp transports.
Designed specifically for making language servers with less boilerplate and handling of text documents. More specifically, this crate:
- Uses the excellent ropey library for fast incremental document updates.
- Automatically negotiates encoding, supporting any of UTF-8, UTF-16, and UTF-32.
- Transparently changes encoding of requests & responses to & from UTF-8.
Just like how incremental text content updates are handled automatically when using this crate,
an optional tree-sitter
cargo feature is also provided, and uses the same, fast incremental
updates to update arbitrary tree-sitter syntax trees when text document contents are updated.
With the tree-sitter
cargo feature enabled, each document may be associated with its own parser,
allowing a language-per-document architecture for language servers that work with multiple languages.
This crate is a personal project of mine, to make small language servers that I want to have, easier to write.
It is not generally intended for public consumption, and will not be published to crates.io
.
It is however generally stable, so feel free to use it at your own risk, either by:
- Specifying it as a git dependency
- Forking this repository