Expand description
Auto LSP
A Rust crate for creating Abstract Syntax Trees (AST) and Language Server Protocol (LSP) servers powered by Tree-sitter
auto_lsp is a generic library for creating Abstract Syntax Trees (AST) and Language Server Protocol (LSP) servers.//!
It leverages crates such as lsp_types, lsp_server, salsa, and texter, and generates the AST of a Tree-sitter language to simplify building LSP servers.
auto_lsp provides useful abstractions while remaining flexible. You can override the default database as well as all LSP request and notification handlers.
It is designed to be as language-agnostic as possible, allowing any Tree-sitter grammar to be used.
See ARCHITECTURE.md for more information.
§✨ Features
- Generates a thread-safe, immutable and iterable AST with parent-child relations from a Tree-sitter language.
- Supports downcasting of AST nodes to concrete types.
- Integrates with a Salsa database and parallelize LSP requests and notifications.
§📚 Documentation
§Examples
§Cargo Features
lsp_server: Enables the LSP server (useslsp_server).wasm: Enables wasm support (only compatible withwasi-p1-threads).
§Inspirations / Similar projects
- Volar
- Type-sitter
- Rust Analyzer
- Ruff
- airblast-dev’s texter, which saved hours of headache
Re-exports§
pub use anyhow;pub use lsp_server;pub use lsp_types;pub use salsa;pub use texter;pub use tree_sitter;
Modules§
- core
- Re-export of the
auto_lsp_corecrate - default
- server
Macros§
- configure_
parsers - Create the parsers with any given language.
- define_
semantic_ token_ modifiers - Define the standard and custom semantic token modifiers.
- define_
semantic_ token_ types - Define the standard and custom semantic token types.