Skip to content

Commit

Permalink
feat: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vuki656 committed Aug 8, 2021
1 parent 0821543 commit 92f4551
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ Displays latest package versions in your `package.json` file as virtual text.

- Display latest package versions as virtual text

## Planned Features
## 🚀 Planned Features

- Upgrade package on current line
- Delete package on current line
- Install custom package version trough input popup
- Install new packages trough search popup
- Install new packages trough search popup [#26](https://github.com/vuki656/package-info.nvim/issues/26)
- Upgrade package on current line [#21](https://github.com/vuki656/package-info.nvim/issues/21)
- Install custom package version trough popup [#24](https://github.com/vuki656/package-info.nvim/issues/24)
- Delete package on current line [#23](https://github.com/vuki656/package-info.nvim/issues/23)
- Set package manager [#22](https://github.com/vuki656/package-info.nvim/issues/22)

## ⚡️ Requirements

Expand All @@ -32,10 +33,16 @@ use { "vuki656/package-info.nvim" }

## ⚙️ Configuration

### Setup

Package Info comes with the following defaults:

### Usage

```lua
require('package-info').setup()
```

### Defaults

```lua
{
colors = {
Expand All @@ -53,30 +60,25 @@ Package Info comes with the following defaults:
}
```

## 🚀 Usage

### Keybindings

Package info comes with the following default commands:
## ⌨️ Keybindings

- `<leader>pus` => Show latest package versions
- `<leader>puc` => Clear package info versions
**Package info has no default Keybindings**.

Remapping
You can copy the ones below:

```lua
-- Display latest versions as virtual text
vim.api.nvim_set_keymap("n", "<leader>xxx", "<cmd>lua require('package-info').display()<cr>",
vim.api.nvim_set_keymap("n", "<leader>ns", "<cmd>lua require('package-info').show()<cr>",
{ silent = true, noremap = true }
)

-- Clear package info virtual text
vim.api.nvim_set_keymap("n", "<leader>xxx", "<cmd>lua require('package-info').clear()<cr>",
vim.api.nvim_set_keymap("n", "<leader>nc", "<cmd>lua require('package-info').hide()<cr>",
{ silent = true, noremap = true }
)
```

### Notes
## 📝 Notes

- Display might be slow on a project with a lot of packages. This is due to the
`npm outdated` command taking a long time. Nothing can be done regarding
Expand Down

0 comments on commit 92f4551

Please sign in to comment.