/luautils

A non-complete collection of Lua utils, used for personal nvim plugin development

Primary LanguageLuaMIT LicenseMIT

luautils

A non-complete collection of Lua utils, used for personal nvim plugin development

Modules

String

  • string.is_empty

Install

-- Using Packer
use "interludedesign/luautils"

Usage

require("luautils.string")

string.is_empty("")
=> true

Testing

This plugin uses plenary.nvim so you'll need that installed via your vim plugin manager. Specs are in lua/spec. It's easiest to run specs from the relevant file with a keymap:

-- Run Plenary tests
vim.api.nvim_set_keymap("n", "<leader><leader>t", "<Plug>PlenaryTestFile", {noremap = true})

See this testing guide for more details.