Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(picker): new file explorer Snacks.picker.explorer() #793

Merged
merged 28 commits into from
Jan 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
58790c8
feat(picker.files): allow forcing the files finder to use a certain cmd
folke Jan 30, 2025
e3ed745
fix(picker.lsp): remove symbol detail from search text. too noisy
folke Jan 30, 2025
1fdff33
feat(picker): opening a picker with the same source as an active pick…
folke Jan 30, 2025
96691a3
feat(rename): optional `file`, `on_rename` for `Snacks.rename.rename_…
folke Jan 30, 2025
fda2bf7
refactor(picker.input): do startinsert when entering the input window
folke Jan 30, 2025
e8464f2
feat(picker): `opts.focus = "input"|"list"|false` to configure what t…
folke Jan 30, 2025
b44c374
fix(picker.config): normalize `opts.cwd`
folke Jan 30, 2025
4b45f3f
feat(picker.config): added `opts.config` which can be a function that…
folke Jan 30, 2025
472ca24
fix(picker): don't destroy active pickers (only an issue when multipl…
folke Jan 30, 2025
eb95a21
fix(picker.layout): fix list cursorline when layout updates
folke Jan 30, 2025
929e86e
fix(layout): better update check for split layouts
folke Jan 30, 2025
1bdc28a
fix(layout): make sure split layouts are still visible when a float l…
folke Jan 30, 2025
083ce94
feat(picker.list): added support for setting a cursor/topline target …
folke Jan 30, 2025
9757a79
feat(picker): `picker:iter()` now also returns `idx`
folke Jan 30, 2025
7f21483
fix(picker): better handling of win Enter/Leave mostly for split layouts
folke Jan 30, 2025
8630ebf
feat(picker.format): better path formatting for directories
folke Jan 30, 2025
5c57e08
refactor(picker.format): remove redundant `depth` and addes support f…
folke Jan 30, 2025
e46dead
feat(layout): make fullscreen work for split layouts
folke Jan 30, 2025
0c0cdeb
fix(layout): better handling of resizing of split layouts
folke Jan 30, 2025
2c4fad8
fix(picker.actions): detect and report circular action references
folke Jan 30, 2025
d37fdbf
feat(picker.actions): separate edit_split etc in separate split and e…
folke Jan 30, 2025
6feb6ad
refactor(picker): indent/hierarchy => tree
folke Jan 30, 2025
b0b4fd8
feat(picker.format): directory formatting
folke Jan 30, 2025
db9a5cf
feat(picker): reworked toggles (flags). they're now configurable. Clo…
folke Jan 30, 2025
7aa892e
feat(picker): new file explorer `Snacks.picker.explorer()`
folke Jan 30, 2025
414ef09
ci: gitignore
folke Jan 30, 2025
553ea5a
fix(picker): show new notifications on top
folke Jan 30, 2025
fb2c546
perf(picker.score): no need to track `in_gap` status. redundant since…
folke Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(picker.config): normalize opts.cwd
folke committed Jan 30, 2025
commit b44c3748aeb857803c59bbf496eb2149aca9d8db
4 changes: 3 additions & 1 deletion lua/snacks/picker/config/init.lua
Original file line number Diff line number Diff line change
@@ -77,8 +77,10 @@ function M.get(opts)

-- Merge the configs
opts = Snacks.config.merge(unpack(todo))
if opts.cwd == true then
if opts.cwd == true or opts.cwd == "" then
opts.cwd = nil
elseif opts.cwd then
opts.cwd = vim.fs.normalize(vim.fn.fnamemodify(opts.cwd, ":p"))
end
M.multi(opts)
return opts