forked from nico/dots
nvim: add plugin 'image.nvim'
This commit is contained in:
parent
43bc80e3bb
commit
6fba49a34e
3 changed files with 47 additions and 0 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
"fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" },
|
"fzf-lua": { "branch": "main", "commit": "ce1e24f2a48089b65deefcb0a71a9856839002b5" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" },
|
"gitsigns.nvim": { "branch": "main", "commit": "4daf7022f1481edf1e8fb9947df13bb07c18e89a" },
|
||||||
"headlines.nvim": { "branch": "master", "commit": "bf17c96a836ea27c0a7a2650ba385a7783ed322e" },
|
"headlines.nvim": { "branch": "master", "commit": "bf17c96a836ea27c0a7a2650ba385a7783ed322e" },
|
||||||
|
"image.nvim": { "branch": "master", "commit": "b3e1af829a56bb038e5f81bf97798a2950064b62" },
|
||||||
"lazy-lsp.nvim": { "branch": "master", "commit": "8cfb2329a4cdc8e1eefe47dc18fb8e8c6dbdf183" },
|
"lazy-lsp.nvim": { "branch": "master", "commit": "8cfb2329a4cdc8e1eefe47dc18fb8e8c6dbdf183" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||||
|
|
|
||||||
43
stow/.config/nvim/lua/nico/lazy/image.lua
Normal file
43
stow/.config/nvim/lua/nico/lazy/image.lua
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
return {
|
||||||
|
"3rd/image.nvim",
|
||||||
|
build = false,
|
||||||
|
config = function()
|
||||||
|
require("image").setup({
|
||||||
|
backend = "kitty",
|
||||||
|
processor = "magick_cli", -- or "magick_rock"
|
||||||
|
integrations = {
|
||||||
|
markdown = {
|
||||||
|
enabled = true,
|
||||||
|
clear_in_insert_mode = false,
|
||||||
|
download_remote_images = true,
|
||||||
|
only_render_image_at_cursor = false,
|
||||||
|
floating_windows = false, -- if true, images will be rendered in floating markdown windows
|
||||||
|
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
|
||||||
|
},
|
||||||
|
neorg = {
|
||||||
|
enabled = true,
|
||||||
|
filetypes = { "norg" },
|
||||||
|
},
|
||||||
|
typst = {
|
||||||
|
enabled = true,
|
||||||
|
filetypes = { "typst" },
|
||||||
|
},
|
||||||
|
html = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
css = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
max_width = nil,
|
||||||
|
max_height = nil,
|
||||||
|
max_width_window_percentage = nil,
|
||||||
|
max_height_window_percentage = 50,
|
||||||
|
window_overlap_clear_enabled = true, -- toggles images when windows are overlapped
|
||||||
|
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
|
||||||
|
editor_only_render_when_focused = true, -- auto show/hide images when the editor gains/looses focus
|
||||||
|
tmux_show_only_in_active_window = true, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
||||||
|
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
@ -21,6 +21,9 @@ set -g history-limit 100000
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
setw -g pane-base-index 1
|
setw -g pane-base-index 1
|
||||||
|
|
||||||
|
set -gq allow-passthrough on
|
||||||
|
set -g visual-activity off
|
||||||
|
|
||||||
# fix undercurls: https://github.com/folke/tokyonight.nvim#fix-undercurls-in-tmux
|
# fix undercurls: https://github.com/folke/tokyonight.nvim#fix-undercurls-in-tmux
|
||||||
set -g default-terminal "${TERM}"
|
set -g default-terminal "${TERM}"
|
||||||
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
|
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue