- Notifications
You must be signed in to change notification settings - Fork1
A small, curated set of utilities for Neovim plugins.
License
NotificationsYou must be signed in to change notification settings
nvim-neorg/lua-utils.nvim
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains a small set of nicities for performing repetitive tasks within Neovim.This set may shrink further as the features are included in other, larger "utility kits".
The code you see in this repository is primarily used withinNeorg.All functions are annotated usingLuaCATS.
The highlight of the repository is thematch function, allowing for complex testing of conditionsin a similar fashion to e.g. Rust. Below is an example:
localmatch=require("lua-utils").matchlocalmy_string="possible-value"--- @typeinteger|string|tablelocaltransformed_value=match(my_string) { ["possible-value"]=10,-- Simple return type. [{"value1","value2"}]="special-case",-- Handling of many cases._=function()-- Functions will be automatically invoked and their return values propagated.print("Error: invalid value provided!")return {}end,}print(transformed_value)
About
A small, curated set of utilities for Neovim plugins.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.