Releases: folke/snacks.nvim
Releases ยท folke/snacks.nvim
v2.30.0
2.30.0 (2025-11-06)
Features
- diff: prettier commit rendering (git show, diff with header) (dc2186e)
- gh: add inline review comment annotations to diff viewer (c83ff8d)
- gh: create review comments in GitHub PR diff, on diff lines. Closes #2446 (85bf3f0)
- layout: allow resizing split layouts. See #2390 (913379c)
- picker.gh_diff: you can now reply to review comments in diffs with
a. See #2446 (c3bda87) - picker.icons: make it easier to add custom icon sources (82e6966)
- picker.marks: added
<c-x>to delete a mark from the list. See #2390 (9a04605) - picker: when picker was started from insert mode, return to insert after paste (a417630)
- util.async: add proper backtrace to unhandled async errors (01f6cac)
Bug Fixes
- gh: force
fancydiff style for gh pr diff, since that's needed to render/interact with review comments (bd71cd4) - gh: only skip empty comment reviews. Closes #2445 (1848d74)
- gh: pass correct context in gh_perform_action. Closes #2442. Closes #2443 (13edbc6)
- gh: properly handly pending requests (7a15e16)
- gh: use lua to parse dates so we can do this in a fast context (cd0d6fe)
- image: run terminal capability detection synchronous when needed. Closes #2439 (58f1152)
- layout: ignore very zindex windows for calulating layout zindex, so that it stays below things like notifications (47340e6)
- lsp: properly detach buffers on LspDetach. Closes #2457 (beb995e)
- picker.actions: don't open a new tab if the current tab is empty. Closes #2461 (4e2424e)
- picker.diff: added
showbreak=""for fancy diff. Closes #2441 (fb55f7b) - picker.format: use file for icon. fallback to ft when buffer is not a file. See #2390 (20ac8bf)
- picker.grep_word: pass
--word-regexptoripgrep(6aad368) - picker.highlight: resolve (4438ee4)
- picker.input: startinsert when starting the picker from terminal mode. See #2390 (b2054a3)
- picker.lsp_config: nil on lsp info (#2459) (c5257fa)
- scope: textobjects should use synchronous treesitter parsing. Closes #2448 (9737c25)
- toggle: set/get raw values for option toggles. See #2390 (41da728)
- win: set
foldcolumn='0'for minimal style. See #2390 (195faa0)
v2.29.0
2.29.0 (2025-11-04)
Features
- gh.diff: show git status in PR diff (c671d06)
- gh: added reviews and nice diffs to gh buffer views. See #2411 (1335ca1)
- gh: allow to update pr branch (#2419) (f75f307)
- gh: use new diff renderer for gh pr reviews (714edec)
- gh: when on a review comment, the
gh_commentaction will now do a reply instead of a top-level comment. Fixes #2410 (a4f2b9d) - gh: you can now use
Snacks.picker.gh_actions()directly to see actions for the checked out PR (d0d10f6) - picker.diff: new fancy diff renderer (22eea90)
- picker.git_diff: show proper git status for git diff files (ab48eeb)
- picker.git_diff: show renames (77609a0)
- picker.lsp_config: added server/dynamic capabilities to preview (da14fac)
- picker: consolidate all diff options under
opts.previewers.diff. Default style isfancy(b65b06c) - zen: added
centeroption that defaults totruefor zen mode andfalsefor zoom mode. Closes #2422 (3c2d791)
Bug Fixes
- dashboard: start job after the terminal window is shown to make sure it has the correct size. Closes #2421 (e440df3)
- diff: fallback if
Normalhas no fg color. Closes #2436 (7f453c4) - diff: improved diff parsing. Closes #2424. Closes #2420 (b6e4eb7)
- diff: remove diff injections. Closes #2406 (ecc21bb)
- gh.api: get repo from upstream remote if availble. fallback to origin (5043637)
- gh.api: pass repo to cmd. Closes #2415 (78046eb)
- gh.diff: fixed rendering of diff header when wrap=true (07c569d)
- gh.item: better method to extract repo from gh url. Closes #2418 (52d544c)
- gh.render: added support for older
StatusContextchecks. Closes #2407 (74864a7) - gh.render: use check name. See #2407 (6f60105)
- gh: better way of determining current PR (bd3c1a0)
- gh: input for api should be a table, not a string. Closes #2427 (1b3e409)
- image: allow to fully disable all image rendering with
opts.image.enabled = false. Closes #2404 (34a6591) - image: disable image conversion error notifications by default (cfcf525)
- lsp: check lsp handlers after LspAttach, since attached_buffers won't have been set (1861b0a)
- picker.actions: only allow stage/unstage/restore for some diffs (9cde35b)
- picker.diff: move git status calc based on diff to format (b553c18)
- picker.diff: parse full diff including diff and hunk headers. Closes #2429 (53d8012)
- picker.git_diff: don't show git status, disable stage/unstage/restore when merge-base is set. Closes #2397 (6ff82ca)
- picker.highlight: resolve all text chunks when needed. Not just the first. (962aadd)
- picker.undo: cleanup tmp files in
async:on("done"). Closes #2434 (3038dac) - picker.undo: set initial target to the current undo entry. See #2434 (dc245ef)
- picker: don't focus a picker window when toggling a window and picker wasn't current. closes #2417 (b80b330)
- revert rename of actions.lua to tomdar87@outlook.com (#2423) (8bb3ad6)
- win: fixed fixbuf. Closes #2409 (2099572)
v2.28.0
2.28.0 (2025-11-01)
Features
- gh: new
gh(GitHub cli) integration (85b8ec2) - image: when opts.conceal, conceal remainig lines that are not covered by the image. See #2391 (404027c)
- picker.buffers: add filetype/buftype to search text (a249c86)
- picker.buffers: added buftype and filetype for scratch buffers (6a13271)
- picker.diff: moved git_diff finder to separate file so it can be re-used + made it more robust. Closes #2366 (3049ad8)
- picker.diff: native diff now also highlights the language of the diffed code in the diff (7260957)
- picker.git_diff:
git_diffnow also shows staged hunks and added stage/unstage/restore actions for hunks. Closes #2382 (1fb3f4d) - picker.git_diff: added
stagedflag (118648c) - picker.highlights: badges (202e595)
- picker.preview: allow items to define a title used in the preview window (4b572f4)
- picker.preview: support for images and render markdown (9585da6)
- picker.util: cmdline parser used to properly parse diff args (5025989)
- picker: better integration with markview and render-markdown when previewing (4708e9a)
- scratch: store scratch info in meta files, instead of the filename + custom filekeys (85f8e22)
- util.spawn:
Proc:json()(5589c9d) - util:
Snacks.util.stop()to safely stop/close a luv handle (ce9e299)
Bug Fixes
- explorer.tree: only strip trasiling forward slashes if not at root. Closes #2375 (72dc621)
- explorer: differentiate if file or folder when deleting on Windows (#2373) (59c5545)
- explorer: do reveal in on_show if explorer is not open yet. Closes #2388 (ba529d4)
- explorer: schedule
on_find(typically reveal), for both files finder and when git status updates the finder. Closes #2388 (a9b57b2) - gh: add action idx to
gh_actionstext (d94184d) - image.inline: off-by-one for finding visible images at the last line of the buffer (04b3a54)
- image: avoid nested math environments (#2345) (66e3dc4)
- image: check for invalid buffer (9ad4178)
- image: check to update on BufWinEnter and attach to buffer changes (e18e4f6)
- image: don't add placements to concealed lines. Closes #2391 (13963b1)
- image: guard against invalid buffers. Closes #2383 (4bb1ce1)
- keymap docs (583a0c1)
- keymap: make sure opts are a table. Closes #2392 (367d1bd)
- layout: only max zindex for snacks windows/layouts (8eddc0b)
- picker.actions:
dropandtabdropshould never reload existing buffers (#2368) (6cf2fee) - picker.actions: use
buffer!instead ofbufferfor edit. Closes #2378 (2a1a001) - picker.diff: better filename parsing. See #2366 (377f3bf)
- picker.diff: first line of header (fb011c2)
- picker.diff: only process
---diffs directly if it doesn't start with a diff header (0a33aec) - picker.filter: get cwd from active tabpage if available (c1b517f)
- picker.finder: mutate existing opts (c91e230)
- picker.finder: tmp fix for #2386 (5eea5f9)
- picker.git_branches: git log preview. Closes #2360 (597ebd4)
- picker.git_diff: remove
--default-prefix, since that's no longer needed. See #2382 (40774ae) - picker.git_diff: set
group=falseby default, since we also havegit_status(530e591) - picker.highlights: modifiable for set_lines (98345fb)
- picker.keymaps: try to locate neovim compiled lua source files for keymaps (76160be)
- picker.lsp: fixed
vim.str_byteindexcapability check. Closes #2389 (46917d0) - picker.lsp: some LSP servers notify completion before sending the actual result. See #2372 (aa8a318)
- picker.lsp: use
LspRequestto track completed and cancelled requests. Fixes #2364 (8afb609) - picker.preview: again. docgen seems broken (758bbfa)
- picker.preview: don't show locations for diff preview (b064488)
- picker.preview: fckup (fd7795e)
- picker.preview: fix (e2c1c52)
- picker.preview: show proper preview message for deleted scratch buffers (4ad8a41)
- picker.util: better relative time format (3e30fb6)
- picker.util: ignore errors from corrupted kv stores. Closes #2394 (b3d01c5)
- picker.watch: ...
v2.27.0
v2.26.0
2.26.0 (2025-10-25)
Features
- explorer: add cross-platform trash support (ed08ef1)
- keymap: add filetype and LSP-aware keymap management (0bf34af)
- util: add LSP utility module with dynamic capability handlers (7a63ba5)
- win: add
SnacksWinSeparatorto defaultwin.wo.winhighlight(#2340) (869709d), closes #2336 - win: add default Snacks prefixed
WinSeparator(#2338) (381265b), closes #2336
Bug Fixes
- dahboard: do full terminal reset when receiving first output and displayed cached contents (c952834)
- dashboard: don't write to closed terminal buffer (f75eaf1)
- dashboard: work-around for jobstart+pty issue where not all output is processed before exit. Closes #1706 (4d776bd)
- explorer: macos has
trashpre-installed, so no need to tryosascriptand move to first. Closes #2349 (d569072) - image: detach image when reloading image file. Closes #2343 (7bf4175)
- image: increase timeout for querying the terminal. Closes #2344 (4122143)
- image: let healthcheck wait till terminal detection is done (b029511)
- image: only attach to a buffer once. Closes #2343 (6f72643)
- image: work around tmux extended-keys breaking TermResponse. Closes #2332 (e93dcfd)
- layout: provide parent win width/height when relative to win (#2346) (602393a)
- picker: fix race condition causing "Finder yielded after done" error. Closes #2327 (c9ccbe5)
- picker: set min file width to 40 (69417ac)
- win: use
sbufferinstead ofsplitfor split windows (bbd6d42)
Performance Improvements
v2.25.0
v2.24.0
2.24.0 (2025-10-23)
Features
- bigfile: disable mini-hipatterns (#2170) (3d4dd13)
- dashboard: optional
filterfor projects. Closes #798 (fe88a07) - debug: allow debug evaluation of block selections (#1331) (231ffae)
- git: allow configuring extra git args and git cmd args for all git sources. See #2178 (5782b5c)
- image: add icns support (#2120) (9df47bc)
- image: added clear fun. Closes #1394 (30687d1)
- image: added support for base64 encoded images in url. Closes #2304 (2c56e10)
- image: allow specifying a page number for inlined pdfs (#1806) (3f0fe34)
- indent: pass win to filter func. Closes #2307 (8116e0b)
- input: added support for a custom highlight functions. Closes #2216 (9b80137)
- layout: height=0.7 for preview in vscode layout (c3d6c01)
- layout: static (non-flex) layouts now shrink the root box to fit the contents. See #2035 (ba7845b)
- picker.finder: added assertions that finder is still running when receiving results (a45503b)
- picker.git_diff: add
baseoption to show diff against a merge base. Useful to see changes on a branch/PR (7964f04) - picker.git: allow passing extra args to git log command for file renames (#1964) (2aee35d)
- picker.git: use default previewer args in git_show (#1736) (f324f96)
- picker.layout: added
confighook for resolved layouts. See #2035 (722f9ea) - picker.lsp_config: added more info to lsp picker (636be5c)
- picker.lsp: added lsp_incoming_calls and lsp_outgoing_calls. Closes #1843 (55d6670)
- picker.lsp: added option
keep_parentstolsp_symbols(defaultfalse). See #2083. closes #2266 (2b9d522) - picker.projects: make max_depth customizable (#2253) (3e9e2e2)
- picker.scratch: add scratch picker with grep, new and delete keybinds (#1019) (ca0f8b2)
- picker.select: select now fits the list to the items independent of the layout. Closes #2035 (5c63614)
- picker: add author field to git log (#2295) (2cf864a)
- picker: add exact match position highlighting for grep results (3b54c8d)
- picker: add git_restore action for git_status picker (2b22fe7)
- picker: add toggle_regex for grep (#1594) (bd6ee23)
- picker: added
Snacks.picker.tags()a picker for ctags. Closes #1728 (4290287) - picker: added custom options to
vim.ui.selectthat snacks can use for a better select (264cab1) - picker: added live support to
git_log, which uses-S(pickaxe) to search. Closes #1544 (c9fa6f7) - picker: allow configuring pathspec for git grep (#2311) (57fbda7)
- picker: also ignore dot bare git files (#2058) (4bb0dae)
- picker: enhanced resume with multi-state support and flexible API (bc6c446)
- picker: flexible filename format (#2294) (9ad5d53)
- picker: mapped
<c-g>toprint_cwdin list. See #2244 (faa6aba) - picker: Support rmagatti/autosession session manager (#1825) (fc06234)
- picker: updated Snacks.picker.lsp_config to work with
vim.lsp.config(292d46f) - picker: when resuming a source that has nothing to resume, start a picker with the source instead (db3c13c)
- terminal: minor improvements for user experience (#2276) (39b14c4)
- toggle: allow notification customization via function (#2247) (3ccab97)
- win: added support for
vim.o.winborder. Set win.border = true to use it (b30523c) - win: all existing snacks windows for all plugins now honor
vim.o.winborder. Defaults toroundedif not set. (c1737d8) - win: generalize footer options for keys (#363) (b8d1719)
- win: make split window "stacking" configurable (e46a094)
Bug Fixes
- bigfile: bigfile doesn't work on windows. (#1969) (b4944ff), closes #1722
- bufdelete: try alternate buffer first and otherwise last used buffer (914c900)
- dashboard: fix path filtering for
recent_fileswithcwdoption (#2201) (057d4ab) - dashboard: oldfiles filter should return a boolean instead of the resul...
v2.23.0
2.23.0 (2025-09-15)
Features
- image.doc: enable inline math rendering for neorg files. Closes #1438 (ec487f5)
- image.inline: honor
concealcursorand hide conceal when selecting lines. Closes #1478 (bc0630e) - image: proper inline rendering of math expressions. Closes #1318. Closes #1454 (6ea4fa7)
- picker.git: added
alloption to also list remote branched forgit_branches. Closes #1465 (3d695ab) - scope: allow disabling scopes with
vim.g.snacks_scope = falseorvim.b.snacks_scope = false. Closes #1463 (5315e26) - util: small ts parse wrapper that parses async when available (9f0aa20)
Bug Fixes
- dashboard: escape filenames for edit. Closes #1453 (8b0e79a)
- explorer: confirm prompt now defaults to
No(f970cbb) - image.inline: remove debug (d9bb639)
- image.latex: don't nest image nodes (714d761)
- image.queries: add image type (1bbd479)
- image: only show anchor icon for inline images shown on the lines below. Closes #1479 (bc2ed15)
- indent: zero indent for blank lines. Closes #1477 (cddf714)
- input: add cr keybind for normal mode. Closes #1468. Closes #1466 (78f0ad6)
- lsp: fix deprecated warnings related to lsp client (07fefd2)
- picker.preview: always use builtin for git log preview (f0d3433)
- statuscolumn: better way of determining open folds. Closes #1445 (1239fb8)
- util.spawn: correctly mark as faild on abort (6917597)
- win: make sure the border is set when setting the title (76311ab)
Performance Improvements
- image: async treesitter parsing for images (e55ae37)
Reverts
v2.22.0
2.22.0 (2025-02-25)
Features
- image: allow disabling math rendering. Closes #1247 (1543a06)
- image: configurable templates for math expressions. Closes #1338 (e039139)
- image: removed
orgintegration, since that is now handled by the org mode plugin directly. (956fe69) - picker.input: added some ctrl+r keymaps similar to cmdline. Closes #1420 (c864a7d)
- util: util method to check if ts lang is available on any Neovim version. See #1422 (e2cb9df)
Bug Fixes
- compat: fixup (ceabfc1)
- compat: properly detect async treesitter parsing (842605f)
- compat: vim.fs.normalize. Closes #1321 (2295cfc)
- dim: check that win is valid when animating dim. Closes #1342 (47e1440)
- image.placement: max width/height in cells is 297. Closes #1345 (5fa93cb)
- image.terminal: reset queue when timer runs (2b34c4d)
- image.terminal: write queued terminal output on main (1b63b18)
- picker.buffers: add
aflag when buffer is visible in a window. See #1417 (91c3da0) - picker.recent: expand to full path before normalizing. Closes #1406 (cf47fa7)
- picker: allow overriding winhl of layout box wins. Closes #1424 (b0f983e)
- picker: disable regex for grep_word (#1363) (54298eb)
- picker: remove unused keymaps for mouse scrolling (33df54d)
- picker: update titles before showing. Closes #1337 (3ae9863)
- scope: use
rawequalto check if scope impl is treesitter. Closes #1413 (4ce197b) - scroll: compat with Neovim 0.9.4 (4c52b7f)
- statuscolumn: right-align the current line number when relativenumber=true. Closes #1376 (dd15e3a)
- win: don't update title is relative win is invalid. Closes #1348 (a00c323)
- win: use correct keys for displaying help. Closes #1364 (b100c93)
- zen: always count cmdheight towards Zen bottom offset (#1402) (041bf1d)
Performance Improvements
- scope: use async treesitter parsing when available (e0f882e)
v2.21.0
2.21.0 (2025-02-20)
Features
- added new
imagesnacks plugin for the kitty graphics protocol (4e4e630) - bigfile: configurable average line length (default = 1000). Useful for minified files. Closes #576. Closes #372 (7fa92a2)
- compat: added
svim, a compatibility layer for Neovim. Closes #1321 (bc902f7) - debug: graduate proc debug to Snacks.debug.cmd (eced303)
- explorer:
opts.includeandopts.exclude. Closes #1068 (ab1889c) - explorer: added
Snacks.explorer.reveal()to reveal the current file in the tree. (b4cf6bb) - explorer: added copy/paste (yank/paste) for files. Closes #1195 (938aee4)
- explorer: added ctrl+f to grep in the item's directory (0454b21)
- explorer: added ctrl+t to open a terminal in the item's directory (81f9006)
- explorer: added diagnostics file/directory status (7f1b60d)
- explorer: added quick nav with
[,]withd/w/efor diagnostics (d1d5585) - explorer: added support for live search (82c4a50)
- explorer: allow disabling untracked git status. Closes #983 (a3b083b)
- explorer: deal with existing buffers when renaming / deleting files. Closes #1315 (6614a2c)
- explorer: different hl group for broken links (1989921)
- explorer: disable fuzzy searches by default for explorer since it's too noisy and we can't sort on score due to tree view (b07788f)
- explorer: file watching that works on all platforms (8399465)
- explorer: focus on first file when searching in the explorer (1d4bea4)
- explorer: git index watcher (4c12475)
- explorer: show symlink target (dfa79e0)
- git_log: add author filter (#1091) (8c11661)
- gitbrowse: add support for git.sr.ht (#1297) (a3b47e5)
- gitbrowse: open permalinks to files. Fixes #320 (#438) (2a06e4c)
- image.doc: allow configuring the header for latex / typst inline in the document. Closes #1303 (bde3add)
- image.doc: allow setting
image.srcwith#set!. Closes #1276 (65f89e2) - image.doc: check for
image.ignorein ts meta. See #1276 (29c777a) - image:
concealoption for inline rendering (disabled by default) (684666f) - image:
Snacks.image.hover()(5f466be) - image: add support for
svelte(#1277) (54ab77c) - image: adde support for
Imagein jsx (95878ad) - image: added
opts.img_dirsto configure the search path for resolving images. Closes #1222 (ad0b88d) - image: added
Snacks.image.doc.at_cursor(). See #1108 (6348ccf) - image: added fallback image rendering for wezterm. Closes #1063 (9e6b1a6)
- image: added math rendering for typst. Closes #1260 (e225823)
- image: added proper support for tmux (b1a3b66)
- image: added support for
.imagetags in neorg (59bbe8d) - image: added support for
typst. Closes #1235 (507c183) - image: added support for a bunch of aditional languages (a596f8a)
- image: added support for angle bracket urls. Closes #1209 (14a1f32)
- image: added support for math expressions in latex and markdown doc + images in latex. Closes #1223 (1bca71a)
- image: added support for mermaid diagrams in markdown (f8e7942)
- image: added support for remote image viewing. Closes #1156 (#1165) (a5748ea)
- image: added support for tsx, jsx, vue and angular (ab0ba5c)
- image: added support for wikilink style images. Closes #1210 (3fda272)
- image: allow customizing font size for math expressions (b052eb9)
- image: allow customizing the default magick args for vector images (2096fcd)
- image: allow forcing image rendering even when the terminal support detection fails (d17a6e4)
- image: apply image window options (73366fa)
- image: better detection of image capabilities of the terminal/mux environment (1795d4b)
- image: better error handling + option to disable error notifications (1adfd29)
- image: better health checks (d389c5d)
- image: check for
magickin health check (1284835) - image: custom
srcresolve function (af21ea3) - image: enabled pdf previ...