Alpha Chen 4 years ago
parent 52e0e2c477
commit 8953f59f38

@ -1,4 +1,16 @@
fennel = require("fennel") local lVer = _VERSION:match("Lua (.+)$")
-- local luarocks = hs.execute("which luarocks"):gsub("\n", "")
local luarocks = "/usr/local/bin/luarocks"
if #luarocks > 0 then
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", "")
end
fennel = require "fennel"
table.insert(package.loaders or package.searchers, fennel.searcher) table.insert(package.loaders or package.searchers, fennel.searcher)
fennel.dofile("init.fnl", { allowedGlobals = false }) fennel.dofile("init.fnl", { allowedGlobals = false })

Loading…
Cancel
Save