Skip to content
/ virgo Public

Virgo ♍︎ - Rust Crate Management for Vim

Notifications You must be signed in to change notification settings

dntstck/virgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Virgo ♍︎ Rust Crate Management for Vim 🦀

Virgo (Vim & Cargo) is a Rust crate management system, seamlessly integrated into Vim. Search for crates, manage crate features, update Cargo.toml, track dependencies, manage your lockfile, explore trending crates, access documentation, extract examples from docs.rs and so much more - all without ever leaving Vim!

🚀 Currently at v1.3.5!


📖 Table of Contents


🔥 Features

Crate Management – Search, add, remove, update, and rollback Rust crates effortlessly.
Feature Orchestration – Add and remove crate features on the fly.
Native Vim Compatibility – Seamlessly integrates with Vim using intuitive :virgo commands.
Blazing Fast Performance – Built in Rust for maximum speed and efficiency.
Fully Automated – No manual edits needed; Virgo takes care of Cargo.toml for you.
Crate Info – Discover documentation, stats, and detailed crate info directly in Vim.
Seamless Integration – Execute streamlined commands instantly using :virgo.
Backup & Restore – Secure your Cargo.toml, rollback safely, and prevent accidental changes.
Visual Feedback – Enhanced output formatting for structured readability and usability.
Dependency Insights – Examine dependencies, visualize trees, track updates, and filter changelogs.
Breaking Changes – Analyze Cargo.toml for breaking updates before they happen.
Rollback Protection – Easily revert changes, maintain stability, and prevent unintended updates.
Optimized Performance – Built in Rust for blazing-fast execution and efficiency.
Compare Versions – Instantly compare bleeding-edge vs latest stable versions.
Docs Lookup – Fetch crate documentation and examples directly from docs.rs.
Standalone Outdated Check – Identify outdated dependencies without relying on Cargo.
Complete Cargo.toml Management – Health checks, edits, structured initialization, and validation.


🚀 What's New - v1.3.5

UI Improvements – Displaying crates, versions and features is more refined.
Added flags :virgo add <crate> -f <feature> – Add a crates feature with -f
Added flags :virgo remove <crate> -f <feature> – Remove a crates feature with -f


🚀 Installation

With vim-plug

Add this to your Vim configuration (~/.vimrc or ~/.config/nvim/init.vim):

Plug 'dntstck/virgo'

Then run:

:PlugInstall

With Vundle

Add this to your .vimrc:

Plugin 'dntstck/virgo'

Then install it with:

:PluginInstall

With Pathogen

Clone the repo into your Vim bundle directory:

git clone https://github.com/dntstck/virgo-vim ~/.vim/bundle/virgo-vim

🛠️ Commands Overview

🔍 Search & Information

:virgo search" Search for a crate on crates.io
:virgo stats " Display the stats of a crate
:virgo info" Displays detailed info of a crate
:virgo versions" Displays all available versions of a crate
:virgo trending" Displays trending crates

🛠 Dependency Management

:virgo add " Adds selected crate
:virgo remove" Removes selected crate
:virgo update" Updates selected dependency
:virgo rollback" Rolls back to a previous version
:virgo compare " Compares bleeding-edge with latest stable version of a selected crate
:virgo depends " Displays all the dependencies of a selected crate

📜 Project & Cargo.toml Handling

:virgo all " Displays all installed dependencies in Cargo.toml
:virgo health" Checks current Cargo.toml for overall health
:virgo breaking" Analyzes Cargo.toml for breaking changes
:virgo lockfile" Inspects Cargo.lock for precise version tracking
:virgo changelog " View changelog for a selected crate (Filter by major, minor, patch, since x.x.x & more)
:virgo tree" Display a tree of dependencies for a crate
:virgo init" Creates a basic Cargo.toml in the current dir
:virgo edit" Edit Name, Version, and Edition in the current Cargo.toml 

🔄 Backup & Restore

:virgo backup" Backup Cargo.toml
:virgo restore " Restore Cargo.toml from latest backup

📚 Documentation & Help

:virgo docs "View documentation for a selected crate, use -o to open in docs.rs or -e to view examples
:virgo help "Print this message or the help of the given subcommand(s)
:virgo about "Display information about Virgo

📸 Usage Examples

🛠 Adding a Crate

Instantly add crates without leaving Vim.
Virgo Add

🔍 Viewing Installed Crates

Displays all currently installed dependencies in Cargo.toml.
Virgo All

🔄 Creating a Backup

Secure your Cargo.toml before making changes.
Virgo Backup

⚠️ Detecting Breaking Changes

Analyze Cargo.toml for potential breaking updates.
Virgo Breaking

📜 Viewing Changelog Entries

Filter changelogs by major, minor, patch, or version.
Virgo Changelog

🔍 Comparing Versions

Instantly compare bleeding-edge with latest stable.
Virgo Compare

🔗 Inspecting Dependencies

Display dependencies of a selected crate.
Virgo Depends

📚 Viewing Documentation & Examples

Quickly fetch crate documentation and code examples.
Virgo Docs

🔎 Viewing Examples

Displays example snippets for a selected crate.
Virgo Docs - Examples

🌐 Opening Docs.rs

Open crate documentation directly in a browser.
Virgo Docs - Open

✏️ Editing Cargo.toml

Modify Name, Version, and Edition in Cargo.toml.
Virgo Edit

✅ Checking Cargo.toml Health

Verify the integrity and structure of Cargo.toml.
Virgo Health

ℹ️ Viewing Crate Info

Display detailed information about a crate.
Virgo Info

🔑 Inspecting Cargo.lock

Track precise crate versions in Cargo.lock.
Virgo Lockfile

⚠️ Checking Outdated Dependencies

Identify outdated dependencies without Cargo.
Virgo Outdated

❌ Removing Crates

Easily remove a selected crate.
Virgo Remove

🔄 Restoring a Backup

Revert Cargo.toml to a previous backup.
Virgo Restore

⏪ Rolling Back Versions

Roll back crates to a previous version.
Virgo Rollback

🔎 Searching for Crates

Find dependencies with blazing-fast lookup.
Virgo Search

📊 Viewing Crate Stats

Display download counts, ratings, and more.
Virgo Stats

🌳 Viewing Dependency Tree

Display a structured dependency tree for a crate.
Virgo Tree

🔥 Discovering Trending Crates

Find trending crates on crates.io.
Virgo Trending

🔄 Updating Crates

Update a dependency to the latest stable version.
Virgo Update

📦 Viewing Available Versions

Display all available versions of a crate.
Virgo Versions


🛠️ Troubleshooting

Common Issues

Permission Denied?

chmod +x ~/.vim/bundle/virgo/bin/virgo

Cargo.lock Conflicts?

cargo generate-lockfile