$ account latex-lsp
TexLab is a Rust-implemented Language Server Protocol (LSP) server for LaTeX and BibTeX. It provides rich IDE features including code completion, diagnostics (grammar, build errors, chktex), definitions, references, hover information, renaming, folding, document symbols, inlay hints, links, formatting, and build/forward-search commands. The architecture is a modular monolith with 20+ internal crates, each encapsulating a specific concern (parsing, syntax definitions, completion, diagnostics, etc.). The core relies on a custom recursive-descent parser using `logos` for lexing and `rowan` for a lossless concrete syntax tree, enabling precise source mappings. External dependencies include `latexmk`, `chktex`, `kpsewhich`, `latexindent`, and `tex-fmt` for build and formatting. Entry points are the binary `texlab` (CLI) and the LSP server loop in `crates/texlab/src/server.rs`. The data flow involves file system watching, parsing, semantic analysis (labels, citations, environments), and incremental updates via a workspace database.