41 lines
1.2 KiB
Lua
41 lines
1.2 KiB
Lua
local iron = require("iron.core")
|
|
|
|
iron.setup({
|
|
config = {
|
|
-- Whether a repl should be discarded or not
|
|
scratch_repl = true,
|
|
-- Your repl definitions come here
|
|
repl_definition = {
|
|
sh = {
|
|
-- Can be a table or a function that
|
|
-- returns a table (see below)
|
|
command = { "zsh" },
|
|
},
|
|
python = {
|
|
command = { "ipython" },
|
|
format = require("iron.fts.common").bracketed_paste,
|
|
},
|
|
},
|
|
-- How the repl window will be displayed
|
|
-- See below for more information
|
|
repl_open_cmd = require("iron.view").split("30%"),
|
|
},
|
|
-- Iron doesn't set keymaps by default anymore.
|
|
-- You can set them here or manually add keymaps to the functions in iron.core
|
|
-- If the highlight is on, you can change how it looks
|
|
-- For the available options, check nvim_set_hl
|
|
keymaps = {
|
|
visual_send = "<space>iv",
|
|
},
|
|
highlight = {
|
|
italic = true,
|
|
},
|
|
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
|
|
})
|
|
|
|
-- iron also has a list of commands, see :h iron-commands for all available commands
|
|
-- vim.keymap.set("n", "<space>rs", "<cmd>IronRepl<cr>")
|
|
-- vim.keymap.set("n", "<space>rr", "<cmd>IronRestart<cr>")
|
|
-- vim.keymap.set("n", "<space>rf", "<cmd>IronFocus<cr>")
|
|
-- vim.keymap.set("n", "<space>ih", "<cmd>IronHide<cr>")
|