plugins.image.settings

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

Type: attribute set of anything

Default: { }

Example:

{
  backend = "kitty";
  max_height = 12;
  max_height_window_percentage = {
    __raw = "math.huge";
  };
  max_width = 100;
  max_width_window_percentage = {
    __raw = "math.huge";
  };
  window_overlap_clear_enabled = true;
  window_overlap_clear_ft_ignore = [
    "cmp_menu"
    "cmp_docs"
    ""
  ];
}

Declared by:

plugins.image.settings.backend

All the backends support rendering inside Tmux.

  • kitty - best in class, works great and is very snappy

  • ueberzug - backed by ueberzugpp, supports any terminal, but has lower performance

    • Supports multiple images thanks to @jstkdng.

note

When choosing the "ueberzug" backend, nixvim will automatically add ueberzugpp as a dependency. Set ueberzugPackage = null to disable this behavior.

Type: null or one of “kitty”, “ueberzug” or raw lua code

Default: null

Plugin default: "kitty"

Declared by:

plugins.image.settings.editor_only_render_when_focused

Auto show/hide images when the editor gains/looses focus.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.image.settings.hijack_file_patterns

Render image files as images when opened.

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

Default: null

Plugin default:

[
  "*.png"
  "*.jpg"
  "*.jpeg"
  "*.gif"
  "*.webp"
  "*.avif"
]

Declared by:

plugins.image.settings.integrations

Per-filetype integrations.

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

Default: null

Plugin default:

{
  css = {
    enabled = false;
  };
  html = {
    enabled = false;
  };
  markdown = {
    enabled = true;
  };
  neorg = {
    enabled = true;
  };
  syslang = {
    enabled = true;
  };
  typst = {
    enabled = true;
  };
}

Declared by:

plugins.image.settings.max_height

Image maximum height.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.image.settings.max_height_window_percentage

Image maximum height as a percentage of the window height.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 50

Declared by:

plugins.image.settings.max_width

Image maximum width.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: null

Declared by:

plugins.image.settings.max_width_window_percentage

Image maximum width as a percentage of the window width.

Type: null or unsigned integer, meaning >=0, or raw lua code

Default: null

Plugin default: 100

Declared by:

plugins.image.settings.tmux_show_only_in_active_window

Auto show/hide images in the correct Tmux window (needs visual-activity off).

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.image.settings.window_overlap_clear_enabled

Toggles images when windows are overlapped.

Type: null or boolean or raw lua code

Default: null

Plugin default: false

Declared by:

plugins.image.settings.window_overlap_clear_ft_ignore

Toggles images when windows are overlapped.

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

Default: null

Plugin default:

[
  "cmp_menu"
  "cmp_docs"
  "snacks_notif"
  "scrollview"
  "scrollview_sign"
]

Declared by: