Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

n-shift/crates.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

THIS PROJECT IS NOT MAINTAINED ANYMORE, look at Saecki's version

📦 crates.nvim

Lua plugin for managing Rust's project dependencies, inspired by vuki656/package-info.nvim

📸 Screenshots

Cargo.toml with nord theme

Screenshot with Nord theme

✨ Features

  • Display latest crate's version as virtual text (unstable versions are optional)

🚀 Planned features

  • Adding new dependency
  • Upgrading dependency
  • Removing dependency
  • Listing all versions for dependency
  • (optional) ui popups via nui.nvim

⚡️Requirements

📩 Installation

use {
    "shift-d/crates.nvim",
    requires = {"nvim-lua/plenary.nvim"}
}
Plug "shift-d/crates.nvim" | Plug "nvim-lua/plenary.nvim"

⚙ Configuration

require("crates").setup(options)

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

📝Notes

  • After calling require("crates").setup(...) following globals will be registered:
    • Namespace "crates"
    • Augroup CratesHighlight
  • If autostart = true option was passed, then Augroup CratesUI will be registered.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages