A rust crate for creating AST and LSP servers powered by tree-sitter.
- Rust 71%
- Python 23.9%
- CSS 4.8%
- JavaScript 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
Codegen / test (push) Has been cancelled
CodSpeed / Run benchmarks (push) Has been cancelled
Run LSP Server - native / test (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Test AST - native / cargo test (push) Has been cancelled
Test AST - native / cargo test-1 (push) Has been cancelled
|
||
| .config | ||
| .github | ||
| .vscode | ||
| book | ||
| crates | ||
| examples | ||
| src | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CHANGELOG.md | ||
| LICENSE.TXT | ||
| README.MD | ||
| release-plz.toml | ||
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 (uses lsp_server).
Inspirations / Similar Projects
- Volar
- Type-sitter
- Rust Analyzer
- Ruff
- texter by airblast-dev, which saved hours of headaches.