--[[ -- This plugin can execute Python code inside Neovim. -- It can be used to enhance the Python Notebook edition from Neovim. --]] return { "benlubas/molten-nvim", enabled = true, version = "^1.0.0", -- Use version <2.0.0 to avoid breaking changes dependencies = { "3rd/image.nvim" }, build = ":UpdateRemotePlugins", init = function() -- This is an example, not a default. Please see the `README` for more configuration options vim.g.molten_output_win_max_height = 12 -- This guide will be using image.nvim -- Don't forget to setup and install the plugin if you want to view image outputs vim.g.molten_image_provider = "image.nvim" -- Optional, I like wrapping. Works for virtual text and the output window vim.g.molten_wrap_output = true -- Output as virtual text. Allows outputs to always be shown, works with images, but can be buggy with longer images vim.g.molten_virt_text_output = true -- This will make it so the output shows up below the \`\`\` cell delimiter vim.g.molten_virt_lines_off_by_1 = true vim.keymap.set("n", "ne", ":MoltenEvaluateOperator", { desc = "Evaluate operator", silent = true }) vim.keymap.set( "n", "nos", ":noautocmd MoltenEnterOutput", { desc = "open output window", silent = true } ) vim.keymap.set("n", "nr", ":MoltenReevaluateCell", { desc = "Re-eval cell", silent = true }) vim.keymap.set( "v", "nR", ":MoltenEvaluateVisualgv", { desc = "execute visual selection", silent = true } ) vim.keymap.set("n", "noh", ":MoltenHideOutput", { desc = "Close output window", silent = true }) vim.keymap.set("n", "nmd", ":MoltenDelete", { desc = "Delete Molten cell", silent = true }) end, }