neovim-dotfiles/lua/plugins/sniprun.lua
2025-10-08 21:24:37 +02:00

33 lines
840 B
Lua

return {
"michaelb/sniprun",
branch = "master",
build = "sh install.sh",
-- do 'sh install.sh 1' if you want to force compile locally
-- (instead of fetching a binary from the github release). Requires Rust >= 1.65
opts = {
repl_enable = { "Mathematica_original" },
interpreter_options = {
Lua_nvim = {
use_on_filetypes = { "lua" },
},
Mathematica_original = {
use_javagraphics_if_contains = { "Plot" }, -- a pattern that need <<JavaGraphics
},
},
display = {
"VirtualLine",
},
live_mode_toggle = "enable",
},
keys = {
{ "<leader>r", "<Plug>SnipRun", desc = "run snipper", silent = true },
{ "<leader>R", "<Plug>SnipLive", desc = "run snipper in REPL mode", silent = true },
{ "r", "<Plug>SnipRun", mode = "v", desc = "run snipper", silent = true },
},
lazy = false,
config = true,
}