{ lib, config, ... }: lib.mkIf (lib.elem "nvim::sniprun" config.machine.pkgs) { programs.nvim-lazy.lazyPlugins = [ { lazy = true; dir = vPlug: vPlug.sniprun; ft = [ "md" "adoc" "org" "go" "py" ]; cmd = [ "SnipRun" ]; opts = { live_mode_toggle = "enable"; # TODO: This does not work, maybe open an issue # selected_interpreters = [ "Python3_fifo" ]; repl_enable = [ "Python3_original" ]; display = [ "TerminalWithCode" ]; }; keys = [ { bind = "sr"; cmd = "SnipRun"; opts = { desc = "Run snippet."; mode = [ "n" "v" ]; }; } { bind = "sq"; cmd = "SnipClose"; opts = { desc = "Stop running interpreters."; mode = [ "n" "v" ]; }; } ]; } ]; }