https://github.com/samsze0/utils.nvim
An unopinionated set of utility functions for neovim plugins
https://github.com/samsze0/utils.nvim
lua neovim neovim-plugin
Last synced: 22 days ago
JSON representation
An unopinionated set of utility functions for neovim plugins
- Host: GitHub
- URL: https://github.com/samsze0/utils.nvim
- Owner: samsze0
- License: mit
- Created: 2024-05-15T03:34:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-22T11:38:15.000Z (over 1 year ago)
- Last Synced: 2024-12-31T19:17:22.914Z (over 1 year ago)
- Topics: lua, neovim, neovim-plugin
- Language: Lua
- Homepage:
- Size: 145 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# utils.nvim
An unopinionated set of utility functions for neovim plugins
The goal of this plugin is to work with existing neovim libraries/plugins to provide a more complete set of utility functions.
A sub-goal of this library is to provide an intuitive wrapper interface over the neovim API. All utilities in this plugin are typed by the [lua-language-server's standard](https://github.com/LuaLS/lua-language-server/wiki/Annotations).
## Usage
[lazy.nvim](https://github.com/folke/lazy.nvim)
```lua
{
"samsze0/utils.nvim",
dependencies = {
"nvim-neotest/nvim-nio",
"pysan3/pathlib.nvim"
}
}
```
## TODO
- Add `vim.system` wrapper
- Add `oop` module
- Add `vim.wait` wrapper
- Add `vim.stricmp` wrapper
- Remove `base64` module and force downstream use `vim.base64`
- Wrap `vim.json`
- Wrap `vim.diff`
- Add `highlight` module
- Remove `uv` module and replace with nvim-nio (if possible)
- Wrap `vim.spell`
- Wrap `vim.inspect_pos` and `vim.show_pos`
- Perhaps update `nullish` impl by leveraging `vim.defaulttable` or `vim.tbl_get`
- Perhaps remove `is_array` and just use `vim.array` or `vim.list` instead
- Wrap `vim.list_contains`, `vim.list_extend`, `vim.list_slice`, `vim.tbl_contains`, `vim.tbl_count`, `vim.tbl_filter`, `vim.tbl_keys`, `vim.tbl_map`, `vim.tbl_values`
- Add `schema` module by leveraging `vim.validate`
- Wrap `vim.loader`
- Wrap `vim.iter` and perhaps advise the usage of `vim.iter` over table utils
## License
MIT