5 releases
0.2.3 | Feb 16, 2023 |
---|---|
0.2.2 | Feb 9, 2023 |
0.2.1 | Feb 7, 2023 |
0.2.0 | Feb 6, 2023 |
0.1.0 | Nov 20, 2022 |
#537 in Text processing
642 downloads per month
19KB
354 lines
lsp-textdocument
A LSP text documents manager that map of text document.
Introduction
You may not be able to manage your text documents comfortably when developing an LSP service. There are two reasons why we develop hard.
- Always given a URL variable only, so we need to read the contents of the file ourselves.
- Need map offsets from string index to text dimensional coordinates.
By listening to the notification from the LSP client, lsp-textdocument
can help you automatically manage text documents.
This crate is base on vscode-languageserver-textdocument.
Example usage
Basic usage
use lsp_textdocument::TextDocuments;
fn main() {
let text_documents = TextDocument::new();
...
let text = text_documents.get_document_content(&url, None);
}
with lsp-server
with tower-lsp
coming soon
Dependencies
~2.9–4MB
~110K SLoC