aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/sniprun.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-09-11 21:11:53 +0200
committersrdusr <trevorgray@srdusr.com>2023-09-11 21:11:53 +0200
commita9347a8d6783b360d0e4481151944b0f961404d9 (patch)
treeb61a5e6beb4d150449ecf004a7e4a6099f4917dc /.config/nvim/lua/plugins/sniprun.lua
parentfd1646bb0d8bca44f263717ec63268947af1386c (diff)
parent38ec7c480730e3f83322fa34a6a4ff700ca503d9 (diff)
downloaddotfiles-a9347a8d6783b360d0e4481151944b0f961404d9.tar.gz
dotfiles-a9347a8d6783b360d0e4481151944b0f961404d9.zip
Merge commit '9489548bca74468976436df44134e4aeb40e8548'
Diffstat (limited to '.config/nvim/lua/plugins/sniprun.lua')
-rw-r--r--.config/nvim/lua/plugins/sniprun.lua57
1 files changed, 57 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/sniprun.lua b/.config/nvim/lua/plugins/sniprun.lua
new file mode 100644
index 0000000..2556c24
--- /dev/null
+++ b/.config/nvim/lua/plugins/sniprun.lua
@@ -0,0 +1,57 @@
+local status_ok, sniprun = pcall(require, 'sniprun')
+if not status_ok then
+ return
+end
+
+sniprun.setup({
+ -- selected_interpreters = {}, --# use those instead of the default for the current filetype
+ -- repl_enable = { "Python3_original" }, --# enable REPL-like behavior for the given interpreters
+ -- repl_disable = {}, --# disable REPL-like behavior for the given interpreters
+
+ -- interpreter_options = { --# intepreter-specific options, see docs / :SnipInfo <name>
+ -- GFM_original = {
+ -- use_on_filetypes = { "markdown.pandoc" }, --# the 'use_on_filetypes' configuration key is
+ -- --# available for every interpreter
+ -- },
+ -- },
+
+ --# you can combo different display modes as desired
+ display = {
+ -- "Classic", --# display results in the command-line area
+ 'VirtualTextOk', --# display ok results as virtual text (multiline is shortened)
+ -- "VirtualTextErr", --# display error results as virtual text
+ -- "TempFloatingWindow", --# display results in a floating window
+ -- "LongTempFloatingWindow", --# same as above, but only long results. To use with VirtualText__
+ -- "Terminal", --# display results in a vertical split
+ -- "TerminalWithCode", --# display results and code history in a vertical split
+ -- "NvimNotify", --# display with the nvim-notify plugin
+ -- "Api" --# return output to a programming interface
+ },
+
+ display_options = {
+ terminal_width = 45, --# change the terminal display option width
+ notification_timeout = 5, --# timeout for nvim_notify output
+ },
+
+ --# You can use the same keys to customize whether a sniprun producing
+ --# no output should display nothing or '(no output)'
+ show_no_output = {
+ 'Classic',
+ 'TempFloatingWindow', --# implies LongTempFloatingWindow, which has no effect on its own
+ },
+
+ --# customize highlight groups (setting this overrides colorscheme)
+ -- snipruncolors = {
+ -- SniprunVirtualTextOk = { bg = "NONE", fg = "#66eeff", ctermbg = "Black", cterfg = "Cyan" },
+ -- SniprunFloatingWinOk = { fg = "NONE", ctermfg = "Cyan" },
+ -- SniprunVirtualTextErr = { bg = "#881515", fg = "#000000", ctermbg = "DarkRed", cterfg = "Black" },
+ -- SniprunFloatingWinErr = { fg = "#881515", ctermfg = "DarkRed" },
+ -- },
+
+ --# miscellaneous compatibility/adjustement settings
+ inline_messages = 0, --# inline_message (0/1) is a one-line way to display messages
+ --# to workaround sniprun not being able to display anything
+
+ borders = 'single', --# display borders around floating windows
+ --# possible values are 'none', 'single', 'double', or 'shadow'
+})