Code Monkey home page Code Monkey logo

vim-package-info's Introduction

vim-package-info

Previously vim-package-json

It lets you view the latest version of each package of your dependency.

Currently supports package.json and Cargo.toml

package.json Cargo.toml

Default colors:

  • green: patch update
  • cyan: minor update
  • red: major update

Installation

Use your favorite plugin manager.

I use vim-plug.

Plug 'meain/vim-package-info', { 'do': 'npm install' }

After installing the plugin, run :UpdateRemotePlugins to register it with Neovim.


Needs virtual text support. ( Neovim 0.3.2 )

Check if echo has('nvim-0.3.2') returns 1

Configuration

Change prefix

let g:vim_package_info_virutaltext_prefix = '  ¤ '

Change highlight group

let g:vim_package_info_virutaltext_highlight = 'NonText'

There are three other highlight groups that you can change. You can change them like this

hi VimPackageInfoPatch guifg=#8BC34A
hi VimPackageInfoMinor guifg=#00BCD4
hi VimPackageInfoMajor guifg=#F44336

Development

Adding a new config file type

It is more or less just adding a few regex templates and a some other stuff. Here are a rough sketch of the steps. Feel free to open an issue and ask if you need more help.

  1. parser.js > depMarkers : specify start and end tokens for different groups
  2. parser.js > nameParserRegex : regex to find the name from a line in the config
  3. parser.js > versionParserRegex : regex to find the current version from a line in the config
  4. utils.js : Add key to global.vimnpmcache
  5. utils.js > getUrl : Add a url formatter
  6. utils.js > getLatestVersion : Find latest version from the received data

vim-package-info's People

Contributors

davidosomething avatar jason0x43 avatar meain avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.