A Neovim plugin that displays installed package versions as virtual text in package.json files.
- Shows actual installed versions next to package dependencies in package.json
- Supports multiple package managers (npm, pnpm, yarn v1)
- Automatically detects the package manager based on lock files
- Updates on file load
- Zero configuration required
- Neovim >= 0.8.0
- One of the following package managers installed:
- npm
- pnpm
- yarn v1
Using lazy.nvim:
{
"danitrap/version-lens.nvim",
config = true
}
The plugin automatically activates when opening a package.json
file. It will:
- Detect your package manager
- Fetch currently installed versions
- Display versions as virtual text at the end of each dependency line
Example:
{
"dependencies": {
"express": "^4.17.1", 4.17.3
"lodash": "~4.17.21" 4.17.21
},
"devDependencies": {
"jest": "^27.0.1" 27.0.6
}
}
No configuration needed! The plugin works out of the box.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details