Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.2 KB

README.md

File metadata and controls

43 lines (33 loc) · 1.2 KB

inlay-hints

Embed inlay hints of rust-analyzer into Rust code without an interactive LSP editor such as VSCode or NeoVim.

Installation

git submodule init
git submodule sync
git submodule update
cargo install --path .

or

cargo install --git https://github.com/yijunyu/inlay-hints

Usage

With a folder containing Rust source code files *.rs, run

inlay-hints [<source-folder>] [<output-folder>]

From Rust code in the source-folder, this command will insert inlay hints labels, including type declarations, parameter names, chaining types, lifetime markers, etc. into the Rust code saved into the output-folder.

  • When the argument <source-folder> is not provided, the source folder will be default to the current folder ..

  • When the argument <output-folder> is not provided, the output folder will be default to the ./inlay-hints.

Counting inlay hints

Since the inlay hints are line-based edits to the original source, a single recursive diff command could count how many have been inserted:

diff -r <source-folder> <output-folder> | grep "^---" | wc

Update

Tracking issue