plugins.sniprun.settings

Options provided to the require('sniprun').setup function.

Type: attribute set of anything

Default: { }

Example:

{
  display = [
    "NvimNotify"
  ];
  inline_messages = true;
  interpreter_options = {
    "<Interpreter_name>" = {
      some_other_option = "other_value";
      some_specific_option = "value";
    };
    C_original = {
      compiler = "clang";
    };
    GFM_original = {
      use_on_filetypes = [
        "markdown.pandoc"
      ];
    };
    Python3_original = {
      error_truncate = "auto";
    };
  };
}

Declared by:

plugins.sniprun.settings.borders

Display borders around floating windows.

Type: null or one of “none”, “single”, “double”, “shadow” or raw lua code

Default: null

Plugin default: "single"

Declared by:

plugins.sniprun.settings.display

You can combo different display modes as desired and with the ‘Ok’ or ‘Err’ suffix to filter only successful runs (or errored-out runs respectively)

Type: null or (list of (string or raw lua code))

Default: null

Plugin default:

[
  "Classic"
  "VirtualTextOk"
]

Example:

[
  "Classic"                   # display results in the command-line  area
  "VirtualTextOk"             # display ok results as virtual text (multiline is shortened)

  # "VirtualText"             # display results as virtual text
  # "TempFloatingWindow"      # display results in a floating window
  # "LongTempFloatingWindow"  # same as above, but only long results. To use with VirtualText[Ok/Err]
  # "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
]

Declared by:

plugins.sniprun.settings.inline_messages

Boolean toggle for a one-line way to display messages to workaround sniprun not being able to display anything.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.sniprun.settings.interpreter_options

Interpreter-specific options, see doc / :SnipInfo <name>.

Type: null or (attribute set of (anything or raw lua code))

Default: null

Plugin default: { }

Example:

{
  # use the interpreter name as key
  GFM_original = {
    # the 'use_on_filetypes' configuration key is
    # available for every interpreter
    use_on_filetypes = [ "markdown.pandoc" ];
  };
  Python3_original = {
    # Truncate runtime errors 'long', 'short' or 'auto'
    # the hint is available for every interpreter
    # but may not be always respected
    error_truncate = "auto";
  };
}

Declared by:

plugins.sniprun.settings.live_display

Display modes used in live_mode.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default:

[
  "VirtualTextOk"
]

Declared by:

plugins.sniprun.settings.live_mode_toggle

Live mode toggle, see Usage - Running for more info.

Type: null or string or raw lua code

Default: null

Plugin default: "off"

Declared by:

plugins.sniprun.settings.repl_disable

Disable REPL-like behavior for the given interpreters.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.sniprun.settings.repl_enable

Enable REPL-like behavior for the given interpreters.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.sniprun.settings.selected_interpreters

Use those instead of the default for the current filetype.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default: [ ]

Declared by:

plugins.sniprun.settings.show_no_output

You can use the same keys to customize whether a sniprun producing no output should display nothing or ‘(no output)’.

"TempFloatingWindow" implies "LongTempFloatingWindow", which has no effect on its own.

Type: null or (list of (string or raw lua code))

Default: null

Plugin default:

[
  "Classic"
  "TempFloatingWindow"
]

Declared by: