Skip to content

Commit

Permalink
chore: bump lua build
Browse files Browse the repository at this point in the history
  • Loading branch information
rktjmp committed Mar 19, 2024
1 parent 84514de commit d7d7949
Show file tree
Hide file tree
Showing 33 changed files with 1,103 additions and 1,403 deletions.
4 changes: 2 additions & 2 deletions lua/hotpot.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
assert((1 == vim.fn.has("nvim-0.9.1")), "Hotpot requires neovim 0.9.1+")
local _let_1_ = require("hotpot.loader")
local make_searcher = _let_1_["make-searcher"]
local searcher = _let_1_["searcher"]
local compiled_cache_path = _let_1_["compiled-cache-path"]
local _let_2_ = require("hotpot.fs")
local join_path = _let_2_["join-path"]
Expand All @@ -12,7 +12,7 @@ local _let_4_ = require("hotpot.api.make")
local automake = _let_4_["auto"]
make_path(compiled_cache_path)
do end (vim.opt.runtimepath):prepend(join_path(compiled_cache_path, "*"))
do end (package.loaders)[1] = make_searcher()
table.insert(package.loaders, 2, searcher)
neovim_runtime.enable()
automake.enable()
local function setup(options)
Expand Down
42 changes: 21 additions & 21 deletions lua/hotpot/api/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,65 +25,65 @@ local function fnl(start, stop, code, range_count)
local function _7_(_241)
local _8_
do
local tbl_17_auto = {}
local i_18_auto = #tbl_17_auto
local tbl_19_auto = {}
local i_20_auto = 0
for _, v in ipairs(_241) do
local val_19_auto = view(v)
if (nil ~= val_19_auto) then
i_18_auto = (i_18_auto + 1)
do end (tbl_17_auto)[i_18_auto] = val_19_auto
local val_21_auto = view(v)
if (nil ~= val_21_auto) then
i_20_auto = (i_20_auto + 1)
do end (tbl_19_auto)[i_20_auto] = val_21_auto
else
end
end
_8_ = tbl_17_auto
_8_ = tbl_19_auto
end
return print(table.concat(_8_, ", "))
end
print_result = _7_
local eval
do
local _10_ = {(2 == range_count), code}
if ((_G.type(_10_) == "table") and ((_10_)[1] == true) and ((_10_)[2] == "=")) then
if ((_G.type(_10_) == "table") and (_10_[1] == true) and (_10_[2] == "=")) then
local function _11_()
local _12_ = {eval_range(0, start, stop)}
if ((_G.type(_12_) == "table") and ((_12_)[1] == true)) then
if ((_G.type(_12_) == "table") and (_12_[1] == true)) then
local rest = {select(2, (table.unpack or _G.unpack)(_12_))}
return print_result(rest)
elseif ((_G.type(_12_) == "table") and ((_12_)[1] == false) and (nil ~= (_12_)[2])) then
local e = (_12_)[2]
elseif ((_G.type(_12_) == "table") and (_12_[1] == false) and (nil ~= _12_[2])) then
local e = _12_[2]
return false, e
else
return nil
end
end
eval = _11_
elseif ((_G.type(_10_) == "table") and ((_10_)[1] == true) and ((_10_)[2] == "")) then
elseif ((_G.type(_10_) == "table") and (_10_[1] == true) and (_10_[2] == "")) then
local function _14_()
return eval_range(0, start, stop)
end
eval = _14_
else
local function _15_()
local _ = (_10_)[1]
local _ = _10_[1]
return ("=" == string.sub(code, 1, 1))
end
if (((_G.type(_10_) == "table") and true and ((_10_)[2] == code)) and _15_()) then
local _ = (_10_)[1]
if (((_G.type(_10_) == "table") and true and (_10_[2] == code)) and _15_()) then
local _ = _10_[1]
local function _16_()
local _17_ = {eval_string(string.sub(code, 2, -1))}
if ((_G.type(_17_) == "table") and ((_17_)[1] == true)) then
if ((_G.type(_17_) == "table") and (_17_[1] == true)) then
local rest = {select(2, (table.unpack or _G.unpack)(_17_))}
return print_result(rest)
elseif ((_G.type(_17_) == "table") and ((_17_)[1] == false) and (nil ~= (_17_)[2])) then
local e = (_17_)[2]
elseif ((_G.type(_17_) == "table") and (_17_[1] == false) and (nil ~= _17_[2])) then
local e = _17_[2]
return false, e
else
return nil
end
end
eval = _16_
elseif ((_G.type(_10_) == "table") and true and ((_10_)[2] == code)) then
local _ = (_10_)[1]
elseif ((_G.type(_10_) == "table") and true and (_10_[2] == code)) then
local _ = _10_[1]
local function _19_()
return eval_string(code)
end
Expand Down Expand Up @@ -137,7 +137,7 @@ local function fnldo(start, stop, code)
end
end
for i = start, stop do
local line = (vim.api.nvim_buf_get_lines(0, (i - 1), i, false))[1]
local line = vim.api.nvim_buf_get_lines(0, (i - 1), i, false)[1]
vim.api.nvim_buf_set_lines(0, (i - 1), i, false, {func((line or ""), i)})
end
return nil
Expand Down
36 changes: 16 additions & 20 deletions lua/hotpot/api/diagnostics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ local function render_error_diagnostic(buf, ns, err)
else
return nil
end
elseif true then
local _ = _3_
return nil
else
local _ = _3_
return nil
end
end
Expand All @@ -67,17 +65,17 @@ local function make_handler(buf, ns)
local compile_string = _let_11_["compile-string"]
local allowed_globals
do
local tbl_17_auto = {}
local i_18_auto = #tbl_17_auto
local tbl_19_auto = {}
local i_20_auto = 0
for n, _ in pairs(_G) do
local val_19_auto = n
if (nil ~= val_19_auto) then
i_18_auto = (i_18_auto + 1)
do end (tbl_17_auto)[i_18_auto] = val_19_auto
local val_21_auto = n
if (nil ~= val_21_auto) then
i_20_auto = (i_20_auto + 1)
do end (tbl_19_auto)[i_20_auto] = val_21_auto
else
end
end
allowed_globals = tbl_17_auto
allowed_globals = tbl_19_auto
end
local fname
do
Expand Down Expand Up @@ -165,13 +163,11 @@ local function do_attach(buf)
local au_group = api.nvim_create_augroup(("hotpot-diagnostics-for-buf-" .. buf), {clear = true})
api.nvim_create_autocmd({"TextChanged", "InsertLeave"}, {buffer = buf, group = au_group, desc = ("Hotpot diagnostics update autocmd for buf#" .. buf), callback = handler})
local function _27_(_241)
if ((_G.type(_241) == "table") and ((_241).match == "fennel")) then
if ((_G.type(_241) == "table") and (_241.match == "fennel")) then
return nil
elseif true then
else
local _ = _241
return M.detach(buf)
else
return nil
end
end
api.nvim_create_autocmd("FileType", {buffer = buf, group = au_group, desc = ("Hotpot diagnostics auto-detach on filetype change for buf#" .. buf), callback = _27_})
Expand All @@ -193,9 +189,9 @@ end
M.detach = function(user_buf, _3fopts)
local buf = resolve_buf_id(user_buf)
local _31_ = data_for_buf(buf)
if ((_G.type(_31_) == "table") and (nil ~= (_31_).ns) and (nil ~= (_31_)["au-group"])) then
local ns = (_31_).ns
local au_group = (_31_)["au-group"]
if ((_G.type(_31_) == "table") and (nil ~= _31_.ns) and (nil ~= _31_["au-group"])) then
local ns = _31_.ns
local au_group = _31_["au-group"]
api.nvim_clear_autocmds({group = au_group, buffer = buf})
reset_diagnostic(ns)
record_detachment(buf)
Expand All @@ -210,10 +206,10 @@ M["error-for-buf"] = function(user_buf)
if (_33_ == nil) then
api.nvim_echo({{"Hotpot diagnostics not attached to buffer, could not get error", "DiagnosticWarn"}}, false, {})
return nil
elseif ((_G.type(_33_) == "table") and (nil ~= (_33_).err)) then
local err = (_33_).err
elseif ((_G.type(_33_) == "table") and (nil ~= _33_.err)) then
local err = _33_.err
return err
elseif ((_G.type(_33_) == "table") and ((_33_).err == nil)) then
elseif ((_G.type(_33_) == "table") and (_33_.err == nil)) then
return nil
else
return nil
Expand Down
8 changes: 3 additions & 5 deletions lua/hotpot/api/eval.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ local function eval_module(modname, _3foptions)
local _let_17_ = require("hotpot.common")
local put_new = _let_17_["put-new"]
local _18_ = mod_search({prefix = "fnl", extension = "fnl", modnames = {(modname .. ".init"), modname}})
if ((_G.type(_18_) == "table") and (nil ~= (_18_)[1])) then
local path = (_18_)[1]
if ((_G.type(_18_) == "table") and (nil ~= _18_[1])) then
local path = _18_[1]
local options
do
local _19_ = vim.deepcopy((_3foptions or {}))
Expand All @@ -81,11 +81,9 @@ local function eval_module(modname, _3foptions)
options = _19_
end
return eval_file(path, options)
elseif true then
else
local _ = _18_
return error(string.format("compile-modname: could not find file for %s", modname))
else
return nil
end
end
return {["eval-string"] = eval_string, ["eval-range"] = eval_range, ["eval-selection"] = eval_selection, ["eval-buffer"] = eval_buffer, ["eval-file"] = eval_file, ["eval-module"] = eval_module}
Loading

0 comments on commit d7d7949

Please sign in to comment.