Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

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

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp