typst-analyzer 0.1.0

A Language server for Typst.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use dashmap::DashMap;
use tower_lsp::{LspService, Server};
use typst_analyzer::backend::Backend;

#[tokio::main]
async fn main() {
    tracing_subscriber::fmt().init();

    let (stdin, stdout) = (tokio::io::stdin(), tokio::io::stdout());

    let (service, socket) = LspService::new(|client| Backend {
        client,
        document: DashMap::new(),
    });
    Server::new(stdin, stdout, socket).serve(service).await;
}