Skip to content

Commit

Permalink
feat(docs): loading provider
Browse files Browse the repository at this point in the history
  • Loading branch information
vuki656 committed Sep 4, 2021
1 parent a0b084c commit 3919bee
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,34 @@ require('package-info').setup()
}
```

### ⏰ Loading Hook

- `package-info` provides a hook to display a loading message

![Package Info Loading Hook](./media/loading.gif)

#### Usage

- It can be used anywhere in `neovim` by invoking `return require('package-info').get_status()`

```lua
local package = require("package-info")

-- Galaxyline
section.left[10] = {
PackageInfoStatus = {
provider = function()
return package.get_status()
end,
},
}
```

#### 256 Color Terminals

If the vim option `termguicolors` is false, package-info switches to 256 color mode.
In this mode [cterm color numbers](https://jonasjacek.github.io/colors/) are used
instead of truecolor hex codes and the color defaults are:
- If the vim option `termguicolors` is false, package-info switches to 256 color mode.
- In this mode [cterm color numbers](https://jonasjacek.github.io/colors/) are used
instead of truecolor hex codes and the color defaults are:

```lua
colors = {
Expand Down
Binary file added media/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3919bee

Please sign in to comment.