Skip to content

Instantly share code, notes, and snippets.

View iagoleal's full-sized avatar
🦕
🦕 🦕 🦕 🦕

Iago Leal iagoleal

🦕
🦕 🦕 🦕 🦕
View GitHub Profile
@iagoleal
iagoleal / lua.lua
Created September 10, 2021 20:11
Properly open lua and fennel required files via gf
local fmt = string.format
-- Iterator that splits a string o a given delimiter
local function split(str, delim)
delim = delim or "%s"
return string.gmatch(str, fmt('[^%s]+', delim))
end
-- Find the proper directory separator depending
-- on lua installation or OS.