diff options
author | Linnnus <[email protected]> | 2023-12-29 00:31:36 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2023-12-29 17:44:31 +0100 |
commit | c9bd82994c9b5b104112bc9472f0bb9a3edacd7d (patch) | |
tree | c466835af68a6c86d2e80be4d72936d29af83338 | |
parent | a48edf6ca1c9434cd256e15d25d5e585aa5357a9 (diff) |
home: Setup guile dev stuff
-rw-r--r-- | home/dev-utils/default.nix | 1 | ||||
-rw-r--r-- | home/neovim/plugins.nix | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/home/dev-utils/default.nix b/home/dev-utils/default.nix index 72b7ff1..b916cbb 100644 --- a/home/dev-utils/default.nix +++ b/home/dev-utils/default.nix @@ -27,6 +27,7 @@ tcl-8_6 crystal nim + guile # Clojure ecosystem clojure diff --git a/home/neovim/plugins.nix b/home/neovim/plugins.nix index a681c9e..54f6d9d 100644 --- a/home/neovim/plugins.nix +++ b/home/neovim/plugins.nix @@ -66,6 +66,21 @@ -- command = start_clj_repl, -- }); + -- Use Guile to evaluate scheme buffers. + local start_guile_repl = "StartGuileRepl"; + local sock_path = "/tmp/guile-repl.sock" + vim.g["conjure#filetype#scheme"] = "conjure.client.guile.socket" + vim.g["conjure#client#guile#socket#pipename"] = sock_path + vim.api.nvim_create_user_command(start_guile_repl, function() + local id = vim.fn.jobstart({ + "${pkgs.guile}/bin/guile", + "--listen=" .. sock_path, + }) + print("Started Guile job #" .. id) + end, { + desc = "Starts an Guile repl session listening on " .. sock_path, + }) + -- Jump to bottom of log when new evaluation happens -- See: https://github.com/Olical/conjure/blob/58c46d1f4999679659a5918284b574c266a7ac83/doc/conjure.txt#L872 vim.cmd [[autocmd User ConjureEval if expand("%:t") =~ "^conjure-log-" | exec "normal G" | endif]] |