diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua index 7b08add..12ec9a6 100644 --- a/lua/core/mappings.lua +++ b/lua/core/mappings.lua @@ -22,7 +22,8 @@ M.general = { --{{{ [""] = { " update ", "update file (save on changes)" }, -- luasnip change choice - [""] = { "luasnip-next-choice", "change luasnip choice" }, + -- [""] = { "luasnip-next-choice", "change luasnip choice" }, + [""] = { "lua require('luasnip.extras.select_choice')()", "change luasnip choice" }, },--}}} n = {--{{{ @@ -251,16 +252,6 @@ M.general = { --{{{ -- Programming languages specifics --------------- - -- luadev - ["lsc"] = {"Luadev", "Luadev scratch window"}, - ["ll"] = {"(Luadev-RunLine)", "Luadev Run Line"}, - ["lr"] = {"(Luadev-Run)", "Luadev Run over movement or text object"}, - ["lw"] = {"(Luadev-RunWord)", "Luadev Run word under cursor"}, - - -- - -- ["r"] = { "", "Run action"}, - - -- config files ["ev"] = {" source ~/.config/nvim/Session.vim" , "edit vim config"}, },--}}} @@ -764,6 +755,15 @@ M.vim_bookmarks = {--{{{ }, }--}}} +M.iron = { + plugin = true, + n = { + ["ir"] = {"IronRepl", "start IronRepl"}, + } + + +} + -- M.neorepl = { -- plugin = true, -- diff --git a/lua/custom/plugins/configs/iron.lua b/lua/custom/plugins/configs/iron.lua new file mode 100644 index 0000000..47d830e --- /dev/null +++ b/lua/custom/plugins/configs/iron.lua @@ -0,0 +1,36 @@ +local ok, iron = pcall(require, "iron.core") +if not ok then return end + +local M = {} + +local ironSetup = { + config = { + scratch_repl = true, + highlight_last = "IronLastSent", + repl_definition = { + sh = { + command = {"sh"} + }, + python = require("iron.fts.python").ipython, + }, + repl_open_cmd = require('iron.view').bottom(20), + }, + keymaps = { + send_motion = "io", + visual_send = "io", + send_file = "ii", + send_line = "il", + cr = "i", + interrupt = "i", + exit = "iq" + } + +} + +function M.setup() + iron.setup(ironSetup) +end + + +return M +-- M.setup() diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 085e81d..98c6efa 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -329,26 +329,35 @@ return { -- ------- -- Eval Lua lines/selections - ["bfredl/nvim-luadev"] = { - lock = true, - cmd = "Luadev", - keys = { - "(Luadev-RunLine)", - "(Luadev-Run)", - "(Luadev-RunWord)", - "(Luadev-Complete)", - }, + -- ["bfredl/nvim-luadev"] = { + -- lock = true, + -- cmd = "Luadev", + -- keys = { + -- "(Luadev-RunLine)", + -- "(Luadev-Run)", + -- "(Luadev-RunWord)", + -- "(Luadev-Complete)", + -- }, + -- setup = function() + -- local autocmd = vim.api.nvim_create_autocmd + -- autocmd("FileType", { + -- pattern = "lua", + -- callback = function () + -- vim.keymap.set({'n', 'i'}, 'r', '(Luadev-RunLine)', { + -- desc = "Luadev RunLine" + -- }) + -- end, + -- }) + -- end + -- }, + ["hkupty/iron.nvim"] = { + cmd = {"Iron*"}, setup = function() - local autocmd = vim.api.nvim_create_autocmd - autocmd("FileType", { - pattern = "lua", - callback = function () - vim.keymap.set({'n', 'i'}, 'r', '(Luadev-RunLine)', { - desc = "Luadev RunLine" - }) - end, - }) - end + require("core.utils").load_mappings "iron" + end, + config = function() + require("custom.plugins.configs.iron").setup() + end }, -- REPL for Lua development