Skip to content

Conversation

@Gaweringo
Copy link

Description

Changing the item.cwd was not being respected by the previewer for directories.
This uses the full path (already computed before) to create the directory preview.

Related Issue(s)

Not an issue, but a discussion:
#2093

@folke folke changed the title fix(picker/preview): Make directory preview respect item.cwd fix(picker.preview): make directory preview respect item.cwd Sep 26, 2025
@folke folke changed the title fix(picker.preview): make directory preview respect item.cwd fix(picker.preview): make directory preview respect item.cwd Sep 26, 2025
@folke folke closed this in d050712 Oct 19, 2025
Aqothy pushed a commit to Aqothy/snacks.nvim that referenced this pull request Oct 20, 2025
github-actions bot added a commit that referenced this pull request Oct 23, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.24.0](v2.23.0...v2.24.0)
(2025-10-23)


### Features

* **bigfile:** disable mini-hipatterns
([#2170](#2170))
([3d4dd13](3d4dd13))
* **dashboard:** optional `filter` for projects. Closes
[#798](#798)
([fe88a07](fe88a07))
* **debug:** allow debug evaluation of block selections
([#1331](#1331))
([231ffae](231ffae))
* **git:** allow configuring extra git args and git cmd args for all git
sources. See [#2178](#2178)
([5782b5c](5782b5c))
* **image:** add icns support
([#2120](#2120))
([9df47bc](9df47bc))
* **image:** added clear fun. Closes
[#1394](#1394)
([30687d1](30687d1))
* **image:** added support for base64 encoded images in url. Closes
[#2304](#2304)
([2c56e10](2c56e10))
* **image:** allow specifying a page number for inlined pdfs
([#1806](#1806))
([3f0fe34](3f0fe34))
* **indent:** pass win to filter func. Closes
[#2307](#2307)
([8116e0b](8116e0b))
* **input:** added support for a custom highlight functions. Closes
[#2216](#2216)
([9b80137](9b80137))
* **layout:** height=0.7 for preview in vscode layout
([c3d6c01](c3d6c01))
* **layout:** static (non-flex) layouts now shrink the root box to fit
the contents. See
[#2035](#2035)
([ba7845b](ba7845b))
* **picker.finder:** added assertions that finder is still running when
receiving results
([a45503b](a45503b))
* **picker.git_diff:** add `base` option to show diff against a merge
base. Useful to see changes on a branch/PR
([7964f04](7964f04))
* **picker.git:** allow passing extra args to git log command for file
renames ([#1964](#1964))
([2aee35d](2aee35d))
* **picker.git:** use default previewer args in git_show
([#1736](#1736))
([f324f96](f324f96))
* **picker.layout:** added `config` hook for resolved layouts. See
[#2035](#2035)
([722f9ea](722f9ea))
* **picker.lsp_config:** added more info to lsp picker
([636be5c](636be5c))
* **picker.lsp:** added lsp_incoming_calls and lsp_outgoing_calls.
Closes [#1843](#1843)
([55d6670](55d6670))
* **picker.lsp:** added option `keep_parents` to `lsp_symbols` (default
`false`). See [#2083](#2083).
closes [#2266](#2266)
([2b9d522](2b9d522))
* **picker.projects:** make max_depth customizable
([#2253](#2253))
([3e9e2e2](3e9e2e2))
* **picker.scratch:** add scratch picker with grep, new and delete
keybinds ([#1019](#1019))
([ca0f8b2](ca0f8b2))
* **picker.select:** select now fits the list to the items independent
of the layout. Closes
[#2035](#2035)
([5c63614](5c63614))
* **picker:** add author field to git log
([#2295](#2295))
([2cf864a](2cf864a))
* **picker:** add exact match position highlighting for grep results
([3b54c8d](3b54c8d))
* **picker:** add git_restore action for git_status picker
([2b22fe7](2b22fe7))
* **picker:** add toggle_regex for grep
([#1594](#1594))
([bd6ee23](bd6ee23))
* **picker:** added `Snacks.picker.tags()` a picker for ctags. Closes
[#1728](#1728)
([4290287](4290287))
* **picker:** added custom options to `vim.ui.select` that snacks can
use for a better select
([264cab1](264cab1))
* **picker:** added live support to `git_log`, which uses `-S` (pickaxe)
to search. Closes
[#1544](#1544)
([c9fa6f7](c9fa6f7))
* **picker:** allow configuring pathspec for git grep
([#2311](#2311))
([57fbda7](57fbda7))
* **picker:** also ignore dot bare git files
([#2058](#2058))
([4bb0dae](4bb0dae))
* **picker:** enhanced resume with multi-state support and flexible API
([bc6c446](bc6c446))
* **picker:** flexible filename format
([#2294](#2294))
([9ad5d53](9ad5d53))
* **picker:** mapped `<c-g>` to `print_cwd` in list. See
[#2244](#2244)
([faa6aba](faa6aba))
* **picker:** Support rmagatti/autosession session manager
([#1825](#1825))
([fc06234](fc06234))
* **picker:** updated Snacks.picker.lsp_config to work with
`vim.lsp.config`
([292d46f](292d46f))
* **picker:** when resuming a source that has nothing to resume, start a
picker with the source instead
([db3c13c](db3c13c))
* **terminal:** minor improvements for user experience
([#2276](#2276))
([39b14c4](39b14c4))
* **toggle:** allow notification customization via function
([#2247](#2247))
([3ccab97](3ccab97))
* **win:** added support for `vim.o.winborder`. Set win.border = true to
use it
([b30523c](b30523c))
* **win:** all existing snacks windows for all plugins now honor
`vim.o.winborder`. Defaults to `rounded` if not set.
([c1737d8](c1737d8))
* **win:** generalize footer options for keys
([#363](#363))
([b8d1719](b8d1719))
* **win:** make split window "stacking" configurable
([e46a094](e46a094))


### Bug Fixes

* **bigfile:** bigfile doesn't work on windows.
([#1969](#1969))
([b4944ff](b4944ff)),
closes [#1722](https://github.com/folke/snacks.nvim/issues/1722)
* **bufdelete:** try alternate buffer first and otherwise last used
buffer
([914c900](914c900))
* **dashboard:** fix path filtering for `recent_files` with `cwd` option
([#2201](#2201))
([057d4ab](057d4ab))
* **dashboard:** oldfiles filter should return a boolean instead of the
result of find. Fixes
[#2283](#2283)
([fcd309f](fcd309f))
* **dashboard:** pcall chansend for dashoard terminal widgets
([dc65ffd](dc65ffd))
* **dashboard:** recent cwd filter matching
([5c4365e](5c4365e))
* **dashboard:** recent_files section not displaying files without cwd
parameter ([#2284](#2284))
([1ed737e](1ed737e))
* **dashboard:** replace deprecated AutoSession command
([#2288](#2288))
([e9228d6](e9228d6))
* **dashboard:** restore showtabline/laststatus when entering another
non-float window. Closes
[#1774](#1774)
([cc69a93](cc69a93))
* **dashboard:** set `border = "none"` on `terminal` sections
([#1643](#1643))
([83f364f](83f364f))
* **dashboard:** update cursor on loading the dashboard. Closes
[#2004](#2004)
([29682a0](29682a0))
* **dashboard:** use fqn for icon. Closes
[#1496](#1496)
([24e92e0](24e92e0))
* **dim:** fixed the issue of dim's scope variable being nil and
outputting… ([#1938](#1938))
([943a3c7](943a3c7))
* **explorer.git:** don't propagate deletes to parent dirs that don't
exist
([835c4cb](835c4cb))
* **explorer.watch:** handle systems where fs_event doesn't return file
names. Closes [#2190](#2190).
Closes [#2032](#2032)
([d6e34b1](d6e34b1))
* **explorer:** mounted directories being detected as non-directories in
Tree:expand ([#2053](#2053))
([7a5eb10](7a5eb10))
* **explorer:** reset main when entering another window. Closes
[#1587](#1587)
([a5d45d5](a5d45d5))
* **git:** always check parents for git root to fix an issue with git
submodules. Closes
[#2143](#2143)
([14dd362](14dd362))
* **gitbrowse:** fixed urls for gitlab
([#2073](#2073))
([9ebf052](9ebf052))
* **gitbrowse:** send commit as a opt when calling gitbrowse
([#2289](#2289))
([a466429](a466429))
* **git:** set `diff.noprefix=false` for `git diff` to ensure correct
format ([#2174](#2174))
([93f43ca](93f43ca))
* **image.terminal:** do only terminal detection for now. Closes
[#2323](#2323)
([6c7ddae](6c7ddae))
* **image:** correct off by one issue in render fallback
([#1560](#1560))
([441bdcd](441bdcd))
* **image:** correct render fallback to handle "editor" relative
position ([#2296](#2296))
([c552cea](c552cea))
* **image:** correct render fallback to handle "editor" relative
position ([#2297](#2297))
([1c3f15c](1c3f15c))
* **image:** detect kitty image protocol through terminal capability
request. Closes
[#1695](#1695)
([43261ba](43261ba))
* **image:** do not save remote image if fetch fails
([#1915](#1915))
([cb6bf05](cb6bf05))
* **image:** ENOENT on preview
([#2301](#2301))
([5173e96](5173e96))
* **image:** hover close in insert mode
([#2215](#2215))
([ef59af0](ef59af0))
* **image:** markdown inline link query for shortened urls
([#1481](#1481))
([2daa1b2](2daa1b2))
* **image:** set winblend=0 for floatwin when use unicode placeholders
([#1615](#1615))
([758e64c](758e64c))
* **image:** skip `\usepackage` in comments and body
([#2325](#2325))
([90227af](90227af))
* **image:** work-around for sha256 not allowed to be a Blob
([92a08ce](92a08ce))
* **indent:** check that win is valid in step. Closes
[#1943](#1943)
([e409f31](e409f31))
* **indent:** nil check before setting extmark
([#1635](#1635))
([02bf7d2](02bf7d2))
* **input:** schedule stopinsert. Fixes
[#1841](#1841)
([ad6cbc8](ad6cbc8))
* **input:** zindex
([67d690d](67d690d))
* **input:** zindex. Closes
[#2302](#2302)
([d491236](d491236))
* **layout:** allocate at least 1 cell for a widget and enlarge/shrink
the root box when needed. Closes
[#2261](#2261)
([71d6d3c](71d6d3c))
* **layout:** allow width/height to be a function. Closes
[#2184](#2184)
([c757d4d](c757d4d))
* **lazygit:** allow extensible user args
([#789](#789))
([da655a3](da655a3))
* **lazygit:** check if default config file exists before adding to
LG_CONFIG_FILE
([#2256](#2256))
([3731644](3731644))
* **main:** get correct winid for prev window
([db399b1](db399b1))
* **notifier:** include icon in padding in minimal style
([#2239](#2239))
([6daef52](6daef52))
* **notifier:** keep filtered notifications in history
([#2209](#2209))
([ac61546](ac61546))
* **picker.actions:** `<c-g>` in list view now prints file path instead
of cwd. Fallback to cwd
([0b0a58a](0b0a58a))
* **picker.actions:** ensure the current window is updated after tabdrop
([#2326](#2326))
([b30121b](b30121b))
* **picker.actions:** multi-action descriptions. Fixes
[#1501](#1501)
([4edf207](4edf207))
* **picker.actions:** take into account if source is `recent` explicitly
([#1920](#1920))
([b9bd8ae](b9bd8ae))
* **picker.core:** respect camelCase for scoring when ignorecase is true
([#1601](#1601))
([a32735b](a32735b))
* **picker.format:** added min_width for truncated paths
([b7f8116](b7f8116))
* **picker.format:** apply hidden file hl group last. Fixes
[#2127](#2127)
([0bf8fe4](0bf8fe4))
* **picker.format:** correcter max_width for truncpath
([a5d2964](a5d2964))
* **picker.format:** simplified resolvable formatters and more correct
([d5b6d30](d5b6d30))
* **picker.git_diff:** use absolute path when adding buffer to avoid
duplicates ([#1819](#1819))
([a012f39](a012f39))
* **picker.git:** add `ignorecase` for `git_grep`
([#1629](#1629))
([7502e77](7502e77))
* **picker.git:** use unmerged icon for unmerged. Fixes
[#1531](#1531)
([abee3c9](abee3c9))
* **picker.grep:** better line/col parsing. Closes
[#2126](#2126). Fixes
[#2123](#2123)
([1fee799](1fee799))
* **picker.grep:** faulty rg cmd. Closes
[#2280](#2280)
([65a5c8b](65a5c8b))
* **picker.list:** resize when needed. Closes
[#2290](#2290)
([df018ed](df018ed))
* **picker.lsp_config:** cmd can be a function
([ba745ba](ba745ba))
* **picker.lsp:** don't process lsp request results when aborted. Closes
[#2327](#2327)
([4e10708](4e10708))
* **picker.lsp:** move get_clients inside vim.schedule to prevent issues
on Neovim 0.11. Closes
[#2320](#2320)
([79f3a8d](79f3a8d))
* **picker.lsp:** trigger docs workflow
([6f1158f](6f1158f))
* **picker.man:** make tab/split/vsplit work. Closes
[#2171](#2171)
([f39d114](f39d114))
* **picker.marks:** fix buffer checking
([#2287](#2287))
([ca0858a](ca0858a))
* **picker.preview:** better hack to deal with buffer local option
weirdness
([c968d4d](c968d4d))
* **picker.preview:** directory preview should use cwd. Closes
[#2212](#2212). Fixes
[#2093](https://github.com/folke/snacks.nvim/issues/2093)
([d050712](d050712))
* **picker.preview:** don't record previeww searches in history and
prevent scrolling from the top. Closes
[#2305](#2305)
([080320b](080320b))
* **picker.preview:** dont do win-local hack for floating windows
([12b2f0d](12b2f0d))
* **picker.qflist:** error with qflist picker when the list contains
invalid items
([#2293](#2293))
([6af1e76](6af1e76))
* **picker.recent:** include closed / unlisted buffers in recent. Closes
[#1745](#1745)
([5959631](5959631))
* **picker:** add type field to qflist item
([#1538](#1538))
([#1539](#1539))
([125978b](125978b))
* **picker:** added show_delay to config max ms to wait to show if no
results found yet. Closes
[#2206](#2206)
([64583a0](64583a0))
* **picker:** allow some sources to use the current window as main.
Closes [#2012](#2012). See
[#1941](#1941)
([5cda953](5cda953))
* **picker:** correct z-index for preview="main" layout
([e796aef](e796aef))
* **picker:** do not record consecutive duplicate history
([#2040](#2040))
([d0a5310](d0a5310))
* **picker:** fixup for pickers that dont display files
([1b4205e](1b4205e))
* **picker:** load correct actions in list of action names. Closes
[#1501](#1501)
([b064be2](b064be2))
* **picker:** lsp_config now includes any configfured LSP and excludes
deprecated servers
([a0d6eba](a0d6eba))
* **picker:** prevent WinEnter handling during startup
([756a791](756a791))
* **picker:** show_delay config value
([67bb3a7](67bb3a7))
* **picker:** show_delay is in ms. Also increase it to allow
auto_confirm to work properly
([924a930](924a930))
* **picker:** use nvim_paste instead of nvim_put. Closes
[#1941](#1941)
([021e04f](021e04f))
* **projects:** normalize item.text for correct Windows support
([#2275](#2275))
([457596b](457596b))
* **rename:** made rename more robust and make sure target directory
exists. Closes [#2252](#2252)
([c494447](c494447))
* **scope:** allow user to disable keys
([#1918](#1918))
([bebf0bd](bebf0bd))
* **scratch:** branch fallback for detached head
([#1519](#1519))
([98345c7](98345c7))
* **scratch:** hide buffer after formatting when close
([#1523](#1523))
([4379085](4379085))
* **scratch:** use icon[1] when icon is a table to avoid table.concat
error ([#2242](#2242))
([ba90011](ba90011))
* **scroll:** don't animate 1 line scrolls (jk). Closes
[#1620](#1620)
([d293b21](d293b21))
* **scroll:** stop anim and reset state when win has new buf, or buf was
changed. Closes
[#1820](#1820). Closes
[#2221](#2221)
([766f7b8](766f7b8))
* **statuscolumn:** show open folds in consecutive levels
([#1534](#1534))
([7bcd3ba](7bcd3ba))
* **terminal:** check win valid before creating a new terminal
([#1927](#1927))
([ba7bbcd](ba7bbcd))
* **terminal:** make sure terminals opend with `open()` can be found
with `list()`. Closes
[#2172](#2172). Closes
[#2173](#2173)
([13f3006](13f3006))
* **terminal:** set buffer when opening terminal with position='current'
([#2162](#2162))
([2aacf55](2aacf55)),
closes [#2148](#2148)
* **terminal:** stack only terminal splits by default. Closes
[#2137](#2137)
([8c50196](8c50196))
* **util:** fix invalid window error
([#1996](#1996))
([32e5bf1](32e5bf1))
* **util:** only use mini.icons if it has been setup. Closes
[#2199](#2199)
([774bf9d](774bf9d))
* **win:** check parent win is valid before getting size
([#2315](#2315))
([471eb03](471eb03))
* **zen:** make zoom and minimizing work in terminal mode
([#1912](#1912))
([fb54927](fb54927))


### Performance Improvements

* **dashboard:** add basic OSC11 and CSI6n support to terminal sections
(gh 10 seconds faster)
([fb016d2](fb016d2))
* **git:** invoke `git status` with `--no-optional-locks`
([#2175](#2175))
([e441c64](e441c64))
* **grep:** move match parsing to resolve and fix an issue with `.*`
results. Closes
[#2308](#2308)
([1417701](1417701))
* **picker:** set `limit_live=10000` by default. Makes no sense to load
millions of matches when doing live searches.
([04990d0](04990d0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant