Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yijunyu/inlay-hints
insert inlay_hints of `rust-analyzer` into Rust code
https://github.com/yijunyu/inlay-hints
Last synced: 10 days ago
JSON representation
insert inlay_hints of `rust-analyzer` into Rust code
- Host: GitHub
- URL: https://github.com/yijunyu/inlay-hints
- Owner: yijunyu
- Created: 2023-01-02T00:32:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-12T10:43:48.000Z (almost 2 years ago)
- Last Synced: 2024-11-06T03:46:23.493Z (about 2 months ago)
- Language: Rust
- Size: 2.05 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# inlay-hints
Embed inlay hints of `rust-analyzer` into Rust code without an interactive LSP editor such as VSCode or NeoVim.
## Installation
```bash
git submodule init
git submodule sync
git submodule update
cargo install --path .
```
or
```bash
cargo install --git https://github.com/yijunyu/inlay-hints
```## Usage
With a `folder` containing Rust source code files `*.rs`, run
```bash
inlay-hints [] []
```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 `` is not provided, the source folder will
be default to the current folder `.`.* When the argument `` 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:
```bash
diff -r | grep "^---" | wc
```
## Updates
- [ ] to fix: the end marker of a function seems not accurate