From 362b4a83c33f5ff30d3dbc3d3d0b996286fae444 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 19 Feb 2026 18:44:33 +0100 Subject: fix: LUA formatting --- lua/ache/plugins/molten-nvim.lua | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 lua/ache/plugins/molten-nvim.lua (limited to 'lua/ache/plugins/molten-nvim.lua') diff --git a/lua/ache/plugins/molten-nvim.lua b/lua/ache/plugins/molten-nvim.lua new file mode 100644 index 0000000..44792fc --- /dev/null +++ b/lua/ache/plugins/molten-nvim.lua @@ -0,0 +1,47 @@ +--[[ +-- 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, +} -- cgit v1.3-2-g11bf