plugins.molten.settings
The configuration options for molten without the molten_
prefix.
For example, the following settings are equivialent to these :setglobal
commands:
foo_bar = 1
->:setglobal molten_foo_bar=1
hello = "world"
->:setglobal molten_hello="world"
some_toggle = true
->:setglobal molten_some_toggle
other_toggle = false
->:setglobal nomolten_other_toggle
Type: attribute set of anything
Default:
{ }
Example:
{
auto_open_output = true;
copy_output = false;
enter_output_behavior = "open_then_enter";
image_provider = "none";
output_crop_border = true;
output_show_more = false;
output_virt_lines = false;
output_win_border = [
""
"━"
""
""
];
output_win_cover_gutter = true;
output_win_hide_on_leave = true;
output_win_style = false;
save_path = {
__raw = "vim.fn.stdpath('data')..'/molten'";
};
show_mimetype_debug = false;
use_border_highlights = false;
virt_lines_off_by1 = false;
wrap_output = false;
}
Declared by:
plugins.molten.settings.auto_image_popup
When true, cells that produce an image output will open the image output automatically with
python’s Image.show()
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.auto_init_behavior
When set to “raise” commands which would otherwise ask for a kernel when they’re run without
a running kernel will instead raise an exception.
Useful for other plugins that want to use pcall
and do their own error handling.
Type: null or string or raw lua code
Default:
null
Plugin default: "init"
Declared by:
plugins.molten.settings.auto_open_html_in_browser
Automatically open HTML outputs in a browser. related: open_cmd
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.auto_open_output
Automatically open the floating output window when your cursor moves into a cell.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.molten.settings.copy_output
Copy evaluation output to clipboard automatically (requires pyperclip
).
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.cover_empty_lines
The output window and virtual text will be shown just below the last line of code in the cell.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.cover_lines_starting_with
When cover_empty_lines
is true
, also covers lines starting with these strings.
Type: null or (list of (string or raw lua code))
Default:
null
Plugin default: [ ]
Declared by:
plugins.molten.settings.enter_output_behavior
The behavior of MoltenEnterOutput.
Type: null or one of “open_then_enter”, “open_and_enter”, “no_open” or raw lua code
Default:
null
Plugin default: "open_then_enter"
Declared by:
plugins.molten.settings.image_provider
How images are displayed.
Type: null or one of “none”, “image.nvim” or raw lua code
Default:
null
Plugin default: "none"
Declared by:
plugins.molten.settings.limit_output_chars
Limit on the number of chars in an output. If you’re lagging your editor with too much output text, decrease it.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 1000000
Declared by:
plugins.molten.settings.open_cmd
Defaults to xdg-open
on Linux, open
on Darwin, and start
on Windows.
But you can override it to whatever you want.
The command is called like: subprocess.run([open_cmd, filepath])
Type: null or string
Default:
null
Declared by:
plugins.molten.settings.output_crop_border
‘crops’ the bottom border of the output window when it would otherwise just sit at the bottom of the screen.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.molten.settings.output_show_more
When the window can’t display the entire contents of the output buffer, shows the number of extra lines in the window footer (requires nvim 10.0+ and a window border).
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.output_virt_lines
Pad the main buffer with virtual lines so the floating window doesn’t cover anything while it’s open.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.output_win_border
Defines the border to use for output window.
Accepts same border values as nvim_open_win()
. See :help nvim_open_win()
for more info.
Type: null or string or list of string or list of list of string or raw lua code
Default:
null
Plugin default:
[
""
"━"
""
""
]
Declared by:
plugins.molten.settings.output_win_cover_gutter
Should the output window cover the gutter (numbers and sign col), or not.
If you change this, you probably also want to change output_win_style
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.molten.settings.output_win_hide_on_leave
After leaving the output window (via :q
or switching windows), do not attempt to redraw
the output window.
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.molten.settings.output_win_max_height
Max height of the output window.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 999999
Declared by:
plugins.molten.settings.output_win_max_width
Max width of the output window.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 999999
Declared by:
plugins.molten.settings.output_win_style
Value passed to the style option in :h nvim_open_win()
.
Type: null or one of false, “minimal” or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.save_path
Where to save/load data with :MoltenSave
and :MoltenLoad
.
Type: null or string or raw lua code
Default:
null
Plugin default:
{
__raw = "vim.fn.stdpath('data')..'/molten'";
}
Declared by:
plugins.molten.settings.show_mimetype_debug
Before any non-iostream output chunk, the mime-type for that output chunk is shown. Meant for debugging/plugin development.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.tick_rate
How often (in ms) we poll the kernel for updates. Determines how quickly the ui will update, if you want a snappier experience, you can set this to 150 or 200.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 500
Declared by:
plugins.molten.settings.use_border_highlights
When true, uses different highlights for output border depending on the state of the cell (running, done, error).
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.virt_lines_off_by_1
Allows the output window to cover exactly one line of the regular buffer when
output_virt_lines
is true
, also effects where virt_text_output
is displayed.
(useful for running code in a markdown file where that covered line will just be ```).
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.virt_text_max_lines
Max height of the virtual text.
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Plugin default: 12
Declared by:
plugins.molten.settings.virt_text_output
When true, show output as virtual text below the cell, virtual text stays after leaving the
cell.
When true, output window doesn’t open automatically on run.
Effected by virt_lines_off_by_1
.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by:
plugins.molten.settings.wrap_output
Wrap output text.
Type: null or boolean or raw lua code
Default:
null
Plugin default: false
Declared by: