An open API service indexing awesome lists of open source software.

https://github.com/nemanjajojic/package-version.nvim

Show installed package version inside of a main package manager file
https://github.com/nemanjajojic/package-version.nvim

composer lock lockfile neovim-plugin package php version

Last synced: 2 months ago
JSON representation

Show installed package version inside of a main package manager file

Awesome Lists containing this project

README

          

# πŸ”’ Package Version

This plugin will help you to manage package version by showing installed version
from `composer.lock` inside of `composer.json`.

![Package version](/images/package-version.gif)

## πŸ“¦ Installation

Install plugin using package manager of your choice, for example with

### lazy.nvim

```lua
{
"nemanjajojic/package-version.nvim",
config = function()
require("package-version").setup()
end,
keys = {
-- Here you can set your preferred keybinding eg.
{
"C",
":ComposerPackageVersion",
mode = "n",
desc = "Show installed composer package version"
},
}

}
```

## πŸ’» Commands

In order to execute command you have to type

```vim
:ComposerPackageVersion
```

> [!IMPORTANT]
> It's important to note that this command can be executed only
> when `composer.json` is open in current buffer.

## ⌨️ Mappings

Plugin do not have any default mapping configured for command.
You can choose your own keybinding.

## πŸ’‘ Idea

An idea is to simplify the workflow for developers who frequently work with
PHP projects by providing immediate visibility of installed package versions directly
within the `composer.json` file.

Apart from enhancing productivity, this feature aims to reduce
context switching between files.

> [!NOTE]
> This plugin draws inspiration from JetBrains PhpStorm IDE’s feature
> that displays installed package versions when the `composer.json` file is open.

## ✨ Next Steps

Plan is to support more package managers in the future:

- npm
- pip

## πŸ‘¨β€πŸ’» Author

[nemanjajojic](https://github.com/nemanjajojic)

## Β© License

This software is released under the MIT License.