Display a selector of compilation targets from your root directory. Run cargo-expand
on the selected option. Dump the results into a scratch buffer and flick on syntax
highlights for said buffer.
To be clear, this plugin can be replicated by typing this into your terminal
cargo expand --lib yourlib > .expanded.rs
nvim .expanded.rs
The plugin just has the added benefit(?) of showing a vim.ui.select
of the parsed
cargo metadata
.
- Lazy
{
"chrisp60/cargo_expand.nvim",
config = function()
vim.keymap.set("n", "[your keybind]", require("cargo_expand").expand)
end,
}
- Configuration options.
- Any and all documentation, vim help docs.
- Display compilation progress in scratch buffer.
- support for
rustc --emit={llvm-ir, asm, mir, etc..}
.- I personally have been trying to write more
unsafe
code, it is nice to see how things get represented in assembly and intermediate representations.
- I personally have been trying to write more
cargo-expand
rustc
(if you are writing Rust, you have this).cargo
(if you are writing Rust, you have this).
- MIT
- Apache
At your choosing.