diff options
| author | unwox <me@unwox.com> | 2024-12-23 23:00:42 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-12-23 23:00:42 +0600 |
| commit | c2bf2853b4319acb2a5e6b90e71014552bc67aec (patch) | |
| tree | e9e42775f94f0c7c6845cefb1eff15e5553fb7ce /.nvim.lua | |
| parent | aa9460bb7132571e66171884b6d1f4625399fb6d (diff) | |
implement module reloading
Diffstat (limited to '.nvim.lua')
| -rw-r--r-- | .nvim.lua | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,14 +1,16 @@ - vim.keymap.set("n", ",tf", ":!./run.sh fetch<cr>") vim.keymap.set("n", ",tt", ":!./run.sh serve<cr>") +vim.keymap.set("n", ",rr", function () + local module = vim.fn.expand("%"):gsub("/", "."):gsub(".fnl$", "") + vim.repl.send({args = "(reload :" .. module .. ")"}) + vim.fn.system("qutebrowser :reload") +end) vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { pattern = {"*.fnl"}, callback = function() - vim.repl.configs.fennel.cmd = {"fennel"} - vim.opt.lispwords:append("local") - vim.opt.lispwords:append("fn") - vim.opt.lispwords:append("set") - vim.opt.lispwords:append("if") + vim.repl.fennel.cmd = {"go", "run", "-tags=fts5,jit", "../.", + "-n", "1", "-D", "main.lua", "bin/serve.fnl"} + vim.repl.fennel.filters = {} end, }) |
