akinsho/dependency-assist.nvim

github github
dependency-management plugin
star 48
stars
alert-circle 4
open issues
users 2
subscribers
git-branch 2
forks
CREATED

2020-10-31

UPDATED

5 months ago

packer

require('packer').startup(function()
  use 'akinsho/dependency-assist.nvim'
end)

paq

require "paq" { 
  'akinsho/dependency-assist.nvim'
}

Dependency-assist.nvim

Inspired by pubspec assist a vscode dart plugin for getting version information for packages, and by vim-crates, a vim plugin for visualising dependency versions.

Dependency assist is a neovim plugin written in lua, which is designed to help you find out which dependencies are up to date and add new ones to your dependency file.

status: Alpha

Dependency versions using virtual text

Supported languages

  • Dart
  • Rust (not 100% complete yet)

rust and dart virtual text

Requirements

  • Nightly Neovim

Installation

Plug 'akinsho/dependency-assist.nvim'

Then in your init.vim somewhere after loading the plugin call

lua << EOF
  require'dependency_assist'.setup{}
EOF

Usage

AddDependency/AddDevDependency

These commands are buffer specific and only added within a supported file. For now this is any dart file or a pubspec.yaml.

This plugin works by showing you the current version of a dependency if it differs from the version you have.

It also provides AddDependency and AddDevDependency commands within a supported filetype. These commands open an input buffer which on hitting Enter is used to search pub.dev for matching packages.

It then returns a list of matches and on selecting them they will be added to your devDependencies or your dependencies depending on what you selected.

UpdateDependencyLine

Whilst inside a dependency file (pubspec.yaml for now) whilst on a line where there is a new version available UpdateDependencyLine will swap the current version for the latest.

Goals

This plugin was designed to be extensible 🤞. Hopefully adding a module for other compatible languages shouldn't be too much work.

This won't scale to all languages, and tbh I'm going to focus my energy on languages I use. If you are interested in contributing a module for the language you use, open an issue.