Skip to content

Commit 41a901b

Browse files
committed
docs: add snacks.nvim integration
1 parent a5d62ad commit 41a901b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

vimdoc.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,28 @@ The above function should be bound to a keymap, e.g. through lazy.nvim.
452452

453453
</details>
454454

455+
### Snacks.nvim
456+
457+
The plugin can be integrated with [Snacks.nvim picker](https://github.com/folke/snacks.nvim) which includes built-in support for previewing media files.
458+
459+
<details> <summary>Example configuration</summary>
460+
461+
```lua
462+
function()
463+
Snacks.picker.files {
464+
ft = { "jpg", "jpeg", "png", "webp" },
465+
confirm = function(self, item, _)
466+
self:close()
467+
require("img-clip").paste_image({}, "./" .. item.file) -- ./ is necessary for img-clip to recognize it as path
468+
end,
469+
}
470+
end()
471+
```
472+
473+
The above function should be bound to a keymap, e.g. through lazy.nvim.
474+
475+
</details>
476+
455477
### Oil.nvim
456478

457479
The plugin also integrates with [oil.nvim](https://github.com/stevearc/oil.nvim), providing a convenient way to browse and select images using Oil's file explorer.

0 commit comments

Comments
 (0)