all repos

init.lua @ 17e5355f1cbe28548cd0f002ed22ab0ae58e68f4

my nvim config
3 files changed, 14 insertions(+), 26 deletions(-)
feat: use snacks.image to render images
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2025-02-28 13:28:01 +0200
Parent: 0c10a54
M lazy-lock.json

@@ -43,6 +43,7 @@ "org-roam.nvim": { "branch": "main", "commit": "c32aa470a9f9c2aa9e63c91859b0425e45cb3d1d" },

"orgmode": { "branch": "master", "commit": "c0cdcbdced83ceb9b9f058b402a8bfc5f64ab3a6" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "schemastore.nvim": { "branch": "main", "commit": "acf16353b88d9ebf8ab69e7fd42522bbb277e0ba" }, + "snacks.nvim": { "branch": "main", "commit": "5eac729fa290248acfe10916d92a5ed5e5c0f9ed" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
M lua/plugins/core.lua

@@ -37,30 +37,4 @@ require("todo-comments").setup {}

require("telescope").load_extension "todo-comments" end, }, - { - "3rd/image.nvim", - version = false, - ft = { "markdown" }, - opts = { - max_height_window_percentage = 65, - integrations = { - markdown = { - only_render_image_at_cursor = true, - clear_in_insert_mode = true, - -- TODO: refactor me daddy - resolve_image_path = function(document_path, image_path, fallback) - if document_path:find(vim.env.OBI_PATH) then - if image_path:match "^[x/]" then - return vim.fs.joinpath(vim.env.OBI_PATH, image_path) - end - - return vim.fs.joinpath(vim.env.OBI_PATH, "assets", image_path) - end - - return fallback(document_path, image_path) - end, - }, - }, - }, - }, }
A lua/plugins/snacks.lua

@@ -0,0 +1,13 @@

+---@type LazySpec +return { + "folke/snacks.nvim", + event = "VeryLazy", + ---@module "snacks" + ---@type snacks.Config + opts = { + image = { + enabled = true, + doc = { inline = false }, + }, + }, +}