
The first sentence a new user should see should ideally answer the questions: * What is rust-analyzer? * Why might I want to use it? The vast majority of users will be interested in using rust-analyzer inside their favourite editor. We should clarify that rust-analyzer is an LSP implementation and that it supports all the classic IDE features. Whilst it's also true that rust-analyzer is modular and organised into libraries, the first impression should (I think) focus on an overview and the primary use case.
rust-analyzer documentation
The rust analyzer manual uses mdbook.
Quick start
To run the documentation site locally:
cargo install mdbook
cargo xtask codegen
cd docs/book
mdbook serve
# make changes to documentation files in doc/book/src
# ...
mdbook will rebuild the documentation as changes are made.
Making updates
While not required, installing the mdbook binary can be helpful in order to see the changes. Start with the mdbook User Guide to familiarize yourself with the tool.
Generated documentation
Four sections are generated dynamically: assists, configuration, diagnostics and features. Their content is found in the generated.md
files
of the respective book section, for example src/configuration_generated.md
, and are included in the book via mdbook's
include functionality. Generated files can be rebuilt by running the various
test cases that generate them, or by simply running all of the rust-analyzer
tests with cargo test
and cargo xtask codegen
.