return { "Vigemus/iron.nvim", config = function() local iron = require("iron.core") local view = require("iron.view") local common = require("iron.fts.common") iron.setup({ config = { scratch_repl = true, -- How the repl window will be displayed repl_open_cmd = "botright 12 new | setlocal buftype=nofile", -- Send selections to the DAP repl if an nvim-dap session is running. dap_integration = true, -- Choose your preferred REPL for each language: repl_definition = { sh = { command = {"zsh"} }, python = { command = {"python3"}, format = common.bracketed_paste_python, block_dividers = { "# %%", "#%%" }, env = {PYTHON_BASIC_REPL = "1"} }, }, }, keymaps = { toggle_repl = "rr", -- toggles the repl open and closed. -- If repl_open_command is a table as above, then the following keymaps are -- available -- toggle_repl_with_cmd_1 = "rv", -- toggle_repl_with_cmd_2 = "rh", restart_repl = "rR", -- calls `IronRestart` to restart the repl send_motion = "sc", visual_send = "sc", send_file = "sf", send_line = "sl", send_paragraph = "sp", send_until_cursor = "su", send_mark = "sm", send_code_block = "sb", send_code_block_and_move = "sn", mark_motion = "mc", mark_visual = "mc", remove_mark = "md", cr = "s", interrupt = "s", exit = "sq", clear = "cl", }, highlight = { italic = true }, ignore_blank_lines = true, }) -- Optional: automatically open the REPL on first send vim.keymap.set("n", "ro", function() local ft = vim.bo.filetype require("iron.core").repl_for(ft) require("iron.core").focus_on(ft) end) end, }