You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
575 B

-- Handle mismatch between homebrew's version of Lua and hammerspoon's version
local lVer = _VERSION:match("Lua (.+)$")
local luarocks = "/opt/homebrew/bin/luarocks"
package.path = package.path .. ";" .. hs.execute(
luarocks .. " --lua-version " .. lVer .. " path --lr-path"
):gsub("\n", "")
package.cpath = package.cpath .. ";" .. hs.execute(
luarocks .. " --lua-version " .. lVer .. " path --lr-cpath"
):gsub("\n", "")
fennel = require "fennel"
table.insert(package.loaders or package.searchers, fennel.searcher)
fennel.dofile("init.fnl", { allowedGlobals = false })