plugins/image: migrate to mkNeovimPlugin

This commit is contained in:
Gaetan Lepage 2025-03-20 13:33:28 +01:00 committed by Gaétan Lepage
parent c5967bf6a5
commit 279d2570b5
3 changed files with 157 additions and 157 deletions

View file

@ -15,52 +15,66 @@
plugins.image = {
enable = true;
backend = "kitty";
integrations = {
markdown = {
enabled = true;
clearInInsertMode = false;
downloadRemoteImages = true;
onlyRenderImageAtCursor = false;
filetypes = [
"markdown"
"vimwiki"
];
};
neorg = {
enabled = true;
clearInInsertMode = false;
downloadRemoteImages = true;
onlyRenderImageAtCursor = false;
filetypes = [ "norg" ];
};
syslang = {
enabled = true;
clearInInsertMode = false;
downloadRemoteImages = true;
onlyRenderImageAtCursor = false;
filetypes = [ "syslang" ];
settings = {
backend = "kitty";
processor = "magick_rock";
integrations = {
markdown.enabled = true;
typst.enabled = true;
neorg.enabled = true;
syslang.enabled = true;
html.enabled = false;
css.enabled = false;
};
max_width = null;
max_height = null;
max_width_window_percentage = 100;
max_height_window_percentage = 50;
scale_factor = 1.0;
kitty_method = "normal";
window_overlap_clear_enabled = false;
window_overlap_clear_ft_ignore = [
"cmp_menu"
"cmp_docs"
"snacks_notif"
"scrollview"
"scrollview_sign"
];
editor_only_render_when_focused = false;
tmux_show_only_in_active_window = false;
hijack_file_patterns = [
"*.png"
"*.jpg"
"*.jpeg"
"*.gif"
"*.webp"
"*.avif"
];
};
};
};
example = {
# At runtime, the plugin tries to get the size of the terminal which doesn't exist in the
# headless environment.
test.runNvim = false;
plugins.image = {
enable = true;
settings = {
backend = "kitty";
max_width = 100;
max_height = 12;
max_height_window_percentage.__raw = "math.huge";
max_width_window_percentage.__raw = "math.huge";
window_overlap_clear_enabled = true;
window_overlap_clear_ft_ignore = [
"cmp_menu"
"cmp_docs"
""
];
};
maxWidth = null;
maxHeight = null;
maxWidthWindowPercentage = null;
maxHeightWindowPercentage = 50;
windowOverlapClearEnabled = false;
windowOverlapClearFtIgnore = [
"cmp_menu"
"cmp_docs"
""
];
editorOnlyRenderWhenFocused = false;
tmuxShowOnlyInActiveWindow = false;
hijackFilePatterns = [
"*.png"
"*.jpg"
"*.jpeg"
"*.gif"
"*.webp"
];
};
};
@ -71,7 +85,7 @@
plugins.image = {
enable = true;
backend = "ueberzug";
settings.backend = "ueberzug";
};
};
@ -80,7 +94,7 @@
plugins.image = {
enable = true;
backend = "kitty";
settings.backend = "kitty";
curlPackage = null;
ueberzugPackage = null;
};