Folke Lemaitre
772f3e9b89
feat(picker): added smart
picker
2025-01-16 13:01:05 +01:00
Folke Lemaitre
7117356b49
perf(picker.util): cache path calculation
2025-01-16 12:57:38 +01:00
Folke Lemaitre
7267e2493b
feat(picker.matcher): integrate custom item scores
2025-01-16 12:57:26 +01:00
Folke Lemaitre
ba3a68f988
style(picker): cleanup
2025-01-16 12:56:51 +01:00
Folke Lemaitre
123f0d9e5d
fix(picker.input): don't set prompt interrupt, but use a <c-c>
mapping instead that can be changed
2025-01-16 12:56:28 +01:00
Folke Lemaitre
0745505f2f
fix(picker.actions): close existing empty buffer if it's the current buffer
2025-01-16 10:14:34 +01:00
Folke Lemaitre
de01218d1d
style(picker.git): lua annotations
2025-01-16 09:58:57 +01:00
Anton Kastritskii
cc69043689
feat(picker.git): added git_diff
picker for diff hunks ( #519 )
...
Hi and thank you for the useful plugin!
## Description
I have been exploring the new picker api and got this git diff picker
working which I think can be a nice addition to the existing set of
picker. The key difference from the existing git_status picker is that
it separates each hunk into its own item similar to `git add --patch`
and when you select an item it takes you to the first hunk's line
instead of top of the buffer. Before I put more effort into it I would
like to see if this is a welcome change first.
This implementation can be further extended by allowing to support
additional arguments such as `--staged`, `--ignore-all-space` or both.
A few points on current implementations. I could not get the per line
parsing to work using the
`require("snacks.picker.source.proc").proc(...)` and fell back to
manually parsing the output after the command finished executing. There
are likely many ways to improve it. I have been using it with telescope
for about a year and so far it worked great. I think more people can
benefit from this picker.
## Related Issue(s)
none
## Screenshots
Demo
https://github.com/user-attachments/assets/6cdfa48e-bc29-4194-8430-092fbc5f3dcd
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-01-16 09:54:31 +01:00
Folke Lemaitre
f06f14c4ae
fix(layout): allow root with relative=cursor. Closes #479
2025-01-16 09:08:19 +01:00
Folke Lemaitre
3fdb7f4461
style(win): luals annotations
2025-01-16 09:08:19 +01:00
Folke Lemaitre
5b1cd464e8
fix(win): fix relative=cursor again
2025-01-16 09:05:06 +01:00
Folke Lemaitre
f351dcfcac
fix(picker): correctly normalize path after fnamemodify
2025-01-16 08:56:57 +01:00
Folke Lemaitre
2479ff7cf4
feat(picker.buffers): del buffer with ctrl+x
2025-01-16 08:54:30 +01:00
Folke Lemaitre
743f8b3fee
fix(win): relative=cursor. Closes #427 . Closes #477
2025-01-16 08:45:36 +01:00
Folke Lemaitre
4c55f1c2da
fix(scope): make sure to parse the ts tree. Fixes #521
2025-01-16 08:37:19 +01:00
Folke Lemaitre
9499b944e7
fix(picker.list): scores debug
2025-01-16 08:37:15 +01:00
Folke Lemaitre
e4e2e88c76
feat(picker.matcher): better scoring algorithm based on fzf. Closes #512 . Fixes #513
2025-01-16 08:11:38 +01:00
Folke Lemaitre
821e23101f
feat(picker.list): added debug option to show scores
2025-01-16 08:09:44 +01:00
Folke Lemaitre
1816931aad
fix(picker.matcher): inverse scores
2025-01-15 22:32:09 +01:00
Folke Lemaitre
2ab18a0b9f
feat(picker.buffers): delete buffers with dd
2025-01-15 22:18:28 +01:00
Folke Lemaitre
0892db4f42
feat(picker.git): stage/unstage files in git status with <tab>
key
2025-01-15 22:12:19 +01:00
Folke Lemaitre
79bea58b1e
fix(picker.minheap): clear sorted on minheap clear. Fixes #492
2025-01-15 21:31:59 +01:00
Folke Lemaitre
a652214f52
fix(picker.preview): don't show line numbers for preview commands
2025-01-15 21:18:52 +01:00
Folke Lemaitre
a2fb70e8ba
fix(picker.git): use Snacks.git.get_root instead vim.fs.root for backward compatibility
2025-01-15 21:18:52 +01:00
Kristijan Husak
2cc7cf42e9
fix(picker): set correct cwd for git status picker ( #505 )
...
## Description
Cwd was wrong for git status picker.
## Related Issue(s)
- Fixes #504
2025-01-15 20:44:04 +01:00
Folke Lemaitre
98562ae6a1
feat(pickers.format): added opts.picker.formatters.file.filename_first
2025-01-15 19:50:52 +01:00
Folke Lemaitre
e36e6af96c
feat(picker.git): git diff/show can now use native or neovim for preview. defaults to neovim. Closes #500 . Closes #494 . Closes #491 . Closes #478
2025-01-15 19:00:33 +01:00
Folke Lemaitre
96ffaba71b
feat(picker.recent): include open files in recent files. Closes #487
2025-01-15 17:59:01 +01:00
Folke Lemaitre
076259d263
fix(picker.select): allow main to be current. Fixes #497
2025-01-15 17:35:45 +01:00
Folke Lemaitre
d67e093bbc
fix(picker): picker:items() should return filtered items, not finder items. Closes #481
2025-01-15 17:30:44 +01:00
Folke Lemaitre
c9e2695969
feat(picker.list): added select_all action mapped to ctrl+a
2025-01-15 17:25:33 +01:00
Folke Lemaitre
bbd1a0885b
fix(picker.preview): pattern to detect binary files was incorrect
2025-01-15 17:11:00 +01:00
Folke Lemaitre
19979c88f3
perf(picker.matcher): yield every 1ms to prevent ui locking in large repos
2025-01-15 17:07:06 +01:00
Folke Lemaitre
6bbf50c5e3
perf(picker.matcher): fast path when we already found a perfect match
2025-01-15 17:03:49 +01:00
Folke Lemaitre
8386540c42
fix(picker): changed inspect mapping to <a-d>
since not all terminal differentiate between <a-i>
and <tab>
2025-01-15 16:44:18 +01:00
Folke Lemaitre
5295741287
perf(picker): matcher optims
2025-01-15 13:10:25 +01:00
Folke Lemaitre
b15e2585eb
style(picker): more useful transform
2025-01-15 10:59:26 +01:00
Folke Lemaitre
b45d12ce78
style(picker): recent is alias for recent_files
2025-01-15 10:59:04 +01:00
Folke Lemaitre
000db17bf9
feat(picker): added preliminary support for combining finder results. More info coming soon
2025-01-15 10:58:31 +01:00
Folke Lemaitre
3e39250796
fix(picker.actions): full path for qflist and loclist actions
2025-01-15 10:42:16 +01:00
Folke Lemaitre
46554a6342
fix(picker): add alias for oldfiles
2025-01-15 10:35:29 +01:00
Folke Lemaitre
2ba165b826
feat(picker): added inspect
action mapped to <c-i>
. Useful to see what search fields are available on an item.
2025-01-15 10:32:27 +01:00
Folke Lemaitre
5582a84020
fix(picker.list): disable folds
2025-01-15 10:25:51 +01:00
Folke Lemaitre
1693fbb0dc
fix(picker.list): include search
filter for highlighting items (live search). See #474
2025-01-15 10:12:51 +01:00
Folke Lemaitre
ae2de9aa81
fix(grep): explicitely set --no-hidden
because of the git filter
2025-01-15 09:53:52 +01:00
Folke Lemaitre
76fbf9e8a8
feat(picker): allow disabling file icons
2025-01-15 09:33:18 +01:00
Folke Lemaitre
c6a9955516
fix(picker.input): strip newllines from pattern (mainly due to pasting in the input box)
2025-01-15 09:33:18 +01:00
Folke Lemaitre
fc06a363b9
fix(lsp): use treesitter highlights for LSP locations
2025-01-15 09:33:18 +01:00
Linnovs
b993be762b
fix(picker): select_and_prev should use list_up instead of list_down ( #471 )
...
## Description
Fix the picker select_and_prev functionality.
2025-01-15 07:50:42 +01:00
Folke Lemaitre
5a83a8e328
feat(picker): add some source aliases like the Telescope / FzfLua names
2025-01-15 06:38:47 +01:00