https://github.com/2KAbhishek/utils.nvim
Powerful Utilities for Neovim Plugin Devs 🛠️🧰
https://github.com/2KAbhishek/utils.nvim
devs github maintainer neovim neovim-plugin plugins utility
Last synced: 8 days ago
JSON representation
Powerful Utilities for Neovim Plugin Devs 🛠️🧰
- Host: GitHub
- URL: https://github.com/2KAbhishek/utils.nvim
- Owner: 2KAbhishek
- License: gpl-3.0
- Created: 2024-10-01T11:03:21.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-05T16:52:39.000Z (15 days ago)
- Last Synced: 2025-04-05T17:33:03.451Z (15 days ago)
- Topics: devs, github, maintainer, neovim, neovim-plugin, plugins, utility
- Language: Lua
- Homepage:
- Size: 62.5 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim-sorted - 2KAbhishek/utils.nvim
- awesome-neovim-sorted - 2KAbhishek/utils.nvim
README
`utils.nvim` is a Neovim plugin that provides a collection of utilities to simplify the development of your Neovim plugins.
## ✨ Features
- **Picker Absctraction**: Offers a simple interface for popular pickers, no need to write custom picker anymore!
- **Caching Mechanism**: Implements a caching system to store data and reduce unnecessary command execution, optimizing performance.
- **Notification Management**: Offers functions to queue and display notifications, allowing seamless user communication within plugins.
- **Shell Execution**: Includes capabilities to execute commands async, work with system tools, improving workflow efficiency.
- More!## ⚡ Setup
### ⚙️ Requirements
- `plenary.nvim`
- `nvim-web-devicons` (optional, for language icons)### 💻 Installation
`utils.nvim` is not meant to be installed by itself, but rather as a dependency for another plugin.
If you are building a plugin that requires the utilities provided by `utils.nvim`, you can add it as a dependency as shown below:
```lua
-- Lazy
{
'yourname/plugin.nvim',
dependencies = {
'2kabhishek/utils.nvim'
opts = {
-- Decide picker is used by default
picker_provider = "snacks", -- 'telescope', 'fzf_lua', or 'snacks' (default)
}
},
},
```## 🚀 Usage
### Modules
`utils.nvim` is divided into several modules, each providing specific functionalities:
- `picker`: a module providing abstractions over various picker providers, supports `telescope`, `fzf_lua`, and `snacks`.
- `cache`: a module for caching data and managing cache files.
- `notification`: a module for simplifying notification queues.
- `language`: a module for programming language filetype and icon management.
- `shell`: a module for executing shell commands and opening URLs, files.
- `json`: a module for handling JSON data.
- `time`: a module for working with time and date.### Commands
`utils.nvim` adds the following command:
- **`UtilsClearCache`**: Clears all cache files saved by the plugin. To execute it, run:
### Help
Run `:help utils.txt` for more details.
## 🏗️ What's Next
Planning to add ``.
### ✅ To-Do
- You tell me!
## ⛅ Behind The Code
### 🌈 Inspiration
utils.nvim was created while working on [octohub.nvim](https://github.com/2kabhishek/octohub.nvim) which relied on a lot of common utilities like async shell execution, notifications, and caching.
### 💡 Challenges/Learnings
- Figuring out the callback mechanism for async functions was a bit tricky.
- Learned better ways to handle caching and notifications.### 🔍 More Info
- [octohub.nvim](https://github.com/2kabhishek/octohub.nvim) — All your GitHub features in Neovim, uses utils.nvim
- [nerdy.nvim](https://github.com/2kabhishek/nerdy.nevim) — Find nerd glyphs easily
- [tdo.nvim](https://github.com/2KAbhishek/tdo.nvim) — Fast and simple notes in Neovim
⭐ hit the star button if you found this useful ⭐
Source
| Blog
| More Links
| Other Projects