aboutsummaryrefslogtreecommitdiffstats
path: root/after/plugin/iron.lua
blob: 3f7ad0b958c5ed2f2765540d5a54a686865ce4ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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",
	},
})