diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-05-29 12:53:17 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2022-05-29 12:53:17 +0200 |
| commit | de5df9df37bf5cb7484f54c9980ba149a11bc960 (patch) | |
| tree | 070e25c4cdd16a4e391d1545b93e21de2ab64ca4 /after/plugin/iron.lua | |
| parent | 3d4804b082fbe77071116b85f80437388c71b92a (diff) | |
| download | nvim-conf-de5df9df37bf5cb7484f54c9980ba149a11bc960.tar.gz nvim-conf-de5df9df37bf5cb7484f54c9980ba149a11bc960.zip | |
Add iron for repl integration
Diffstat (limited to 'after/plugin/iron.lua')
| -rw-r--r-- | after/plugin/iron.lua | 41 |
1 files changed, 41 insertions, 0 deletions
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 `<plug>(...)` 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 = "<space>sc", + visual_send = "<space>sc", + send_line = "<space>sl", + repeat_cmd = "<space>s.", + cr = "<space>s<cr>", + interrupt = "<space>s<space>", + exit = "<space>sq", + clear = "<space>cl", + }, +}) |