From de5df9df37bf5cb7484f54c9980ba149a11bc960 Mon Sep 17 00:00:00 2001 From: Ariel D'Alessandro Date: Sun, 29 May 2022 12:53:17 +0200 Subject: Add iron for repl integration --- after/plugin/iron.lua | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 after/plugin/iron.lua (limited to 'after/plugin') diff --git a/after/plugin/iron.lua b/after/plugin/iron.lua new file mode 100644 index 0000000..3f7ad0b --- /dev/null +++ b/after/plugin/iron.lua @@ -0,0 +1,41 @@ +local ok, iron = pcall(require, "iron.core") + +if not ok then + return +end + +iron.setup({ + config = { + highlight_last = "IronLastSent", + -- If iron should expose `(...)` mappings for the plugins + should_map_plug = false, + -- Whether a repl should be discarded or not + scratch_repl = true, + close_window_on_exit = true, + -- Your repl definitions come here + repl_definition = { + sh = { + command = { "zsh" }, + }, + javascript = { + command = { "node" }, + }, + php = { + command = { "sail", "tinker" }, + }, + }, + repl_open_cmd = "rightbelow vertical 100 split", + -- how the REPL window will be opened, the default is opening + -- a float window of height 40 at the bottom. + }, + keymaps = { + send_motion = "sc", + visual_send = "sc", + send_line = "sl", + repeat_cmd = "s.", + cr = "s", + interrupt = "s", + exit = "sq", + clear = "cl", + }, +}) -- cgit v1.2.3