File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,3 +162,6 @@ x509.genkey
162162
163163# Documentation toolchain
164164sphinx_ * /
165+
166+ # Rust analyzer configuration
167+ rust-project.json
Original file line number Diff line number Diff line change @@ -145,6 +145,24 @@ the component manually::
145145The standalone installers also come with ``rustdoc ``.
146146
147147
148+ rust-analyzer
149+ *************
150+
151+ The `rust-analyzer <https://rust-analyzer.github.io/ >`_ language server can
152+ be used with many editors to enable syntax highlighting, completion, go to
153+ definition, and other features.
154+
155+ ``rust-analyzer `` will need to be
156+ `configured <https://rust-analyzer.github.io/manual.html#non-cargo-based-projects >`_
157+ to work with the kernel by adding a ``rust-project.json `` file in the root folder.
158+ The example ``Documentation/rust/rust-project.json `` can
159+ be used after updating ``sysroot_src `` and including the relevant modules.
160+ The path to ``sysroot_src `` is given by::
161+
162+ $(rustc --print sysroot)/lib/rustlib/src/rust/library
163+
164+
165+
148166Configuration
149167-------------
150168
You can’t perform that action at this time.
0 commit comments