THIS PROJECT IS NOT MAINTAINED ANYMORE, look at Saecki's version
Lua plugin for managing Rust's project dependencies, inspired by vuki656/package-info.nvim
Screenshot with Nord theme
- Display latest crate's version as virtual text (unstable versions are optional)
- Adding new dependency
- Upgrading dependency
- Removing dependency
- Listing all versions for dependency
- (optional) ui popups via nui.nvim
- Neovim 0.5.0+
- Curl executable in PATH
- plenary.nvim
use {
"shift-d/crates.nvim",
requires = {"nvim-lua/plenary.nvim"}
}
Plug "shift-d/crates.nvim" | Plug "nvim-lua/plenary.nvim"
require("crates").setup(options)
{
colors = {
up_to_date = "#3C4048", -- color for up to date crate
outdated = "#d19a66", -- color for outdated crate
},
icons = {
enable = true, -- whether to enable icons
style = {
up_to_date = "| ", -- text before up to date version
outdated = "| ", -- text before outdated version
},
},
autostart = false, -- register plugin for autostart
unstable = false, -- show unstable versions
}
NOTE: if
termguicolors
is set to false, crates.nvim switches to 256 color mode. instead of hex codes cterm color numbers will be used. Color defaults for 256 color mode:
colors = {
up_to_date = "237",
outdated = "173",
}
NOTE: crates.nvim currently has no vimscript configuration support
- After calling
require("crates").setup(...)
following globals will be registered:- Namespace
"crates"
- Augroup
CratesHighlight
- Namespace
- If
autostart = true
option was passed, then AugroupCratesUI
will be registered.