Commit graph

189 commits

Author SHA1 Message Date
Folke Lemaitre
3d695ab7d0
feat(picker.git): added all option to also list remote branched for git_branches. Closes #1465 2025-03-01 09:48:31 +01:00
Folke Lemaitre
c864a7d378
feat(picker.input): added some ctrl+r keymaps similar to cmdline. Closes #1420 2025-02-25 13:53:12 +01:00
Folke Lemaitre
33df54dae7
fix(picker): remove unused keymaps for mouse scrolling 2025-02-25 09:13:45 +01:00
iniw
54298eb624
fix(picker): disable regex for grep_word (#1363)
## Related Issue(s)
- Fixes #1361
2025-02-21 19:25:46 +01:00
Folke Lemaitre
bc902f7032
feat(compat): added svim, a compatibility layer for Neovim. Closes #1321 2025-02-20 06:59:44 +01:00
Folke Lemaitre
4551f499c7
fix(picker): go back to last window on cancel instead of main 2025-02-20 06:24:06 +01:00
Folke Lemaitre
bd6a62af12
feat(picker): renamed native -> builtin + fixed diff mode used for undo. Closes #1302 2025-02-19 16:56:40 +01:00
Folke Lemaitre
92786c5b03
feat(picker.git_diff): use the diff previewer for git_diff so that delta can be used. See #1302 2025-02-19 16:56:40 +01:00
Folke Lemaitre
a9a84dde2e
fix(picker.actions): keymap confirm. Closes #1252 2025-02-18 23:05:40 +01:00
Imron Gamidli
8c1166165b
feat(git_log): add author filter (#1091)
## Description

I was using LazyGit feature to filter git logs by the author,
unfortunately it was missing in snacks picker. Here is my solution to
it. Let me know if you have better suggestion :)

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-02-18 21:12:31 +01:00
Pedro Pombeiro
4d46574b24
feat(picker.git): allow passing extra args to other git pickers (#1205)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

This PR builds on
7122a03fdf
to provide a way to pass custom `args` to git command invocations.

An alternative (probably cleaner) way of doing this could be to add an
`args` field to `picker.sources.git`:

```yaml
      picker = {
        ---@class snacks.picker.previewers.Config
        previewers = {
          git = {
            args = git_opts(),
          },
        },
        ---@class snacks.picker.sources.Config
        sources = {
          git = {
            args = git_opts(),
          },
        },
```

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

Fixes #1184

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-02-18 21:07:50 +01:00
Folke Lemaitre
d6a38acbf5
feat(picker): new native diff mode (disabled by default). Can be used to show delta diffs for undo. Closes #1288 2025-02-18 20:47:11 +01:00
Pete Kazmier
8b19fd0332
fix(picker.git): preserve chronological order when matching (#1216)
## Description

When using the git log sources, what are your thoughts on preserving the
sort order when matching? I find most often when I use this picker I
want to see results in reverse chronological order. For example, I like
to use the picker to review the commit log to see new features added to
a repo.

## Screenshots

When matching for `feat` in the snacks repo with current behavior, the
output is less than useful:
<img width="868" alt="image"
src="https://github.com/user-attachments/assets/ed0fdf2a-ee1f-4325-8c87-85911837a757"
/>

But with the proposed change, it's much more relevant:
<img width="868" alt="image"
src="https://github.com/user-attachments/assets/7052b353-d38d-4573-bf72-b0d99c21672d"
/>

## Alternatives

I can override in my config:

```lua
      picker = {
        sources = {
          git_log = { sort = { fields = { "score:desc", "idx" } } },
          git_log_file = { sort = { fields = { "score:desc", "idx" } } },
          git_log_line = { sort = { fields = { "score:desc", "idx" } } },
        },
      },
```
2025-02-17 19:11:37 +01:00
Folke Lemaitre
41c4391b72
feat(picker): allow overriding default file/dir/dir_open icons. Closes #1199 2025-02-15 15:59:26 +01:00
Folke Lemaitre
938aee4a02
feat(explorer): added copy/paste (yank/paste) for files. Closes #1195 2025-02-15 15:44:35 +01:00
Folke Lemaitre
f311d1c83a
fix(picker.buffers): remove dd to delete buffer from input keymaps. Closes #1193 2025-02-15 12:23:30 +01:00
Folke Lemaitre
7122a03fdf
feat(picker.git): allow passing extra args to git grep. Closes #1184 2025-02-15 07:13:41 +01:00
Folke Lemaitre
ffc6fe3965
feat(picker): default c-t keymap to open in tab 2025-02-14 22:22:46 +01:00
Folke Lemaitre
6d0d2dc2a7
feat(picker): added c-q to list 2025-02-14 22:20:21 +01:00
Folke Lemaitre
243eecaca5
feat(picker.format): opts.formatters.file.use_git_status_hl defaults to true and adds git status hl to filename 2025-02-14 07:39:00 +01:00
Folke Lemaitre
e8de28b56e
feat(picker): opts.focus can be used to set default focus window. opts.enter if picker should be focused on enter. Closes #1162 2025-02-14 07:09:51 +01:00
Iordanis Petkakis
c61f9eb286
feat(treesitter): add tree boolean to toggle on/off tree symbols (#1105)
## Description
Adds a `opts.tree` boolean option for treesitter picker to toggle on/off
tree symbols
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None, rather a discussion #1101
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-02-12 13:18:37 +01:00
Folke Lemaitre
d870f16453
feat(picker.proc): added proc debug mode 2025-02-12 07:32:42 +01:00
Folke Lemaitre
a8dda993e5
fix(picker.notifications): close on confirm. Closes #1092 2025-02-12 07:05:48 +01:00
Folke Lemaitre
76f6e4f81c
fix(picker.highlights): close on confirm. Closes #1096 2025-02-12 07:04:13 +01:00
Folke Lemaitre
ab1889c35b
feat(explorer): opts.include and opts.exclude. Closes #1068 2025-02-11 22:22:04 +01:00
Folke Lemaitre
910437f145
feat(picker.preview): allow passing additional args to the git preview command 2025-02-11 20:12:26 +01:00
Folke Lemaitre
0d4aa98cea
feat(picker): added lsp_config source 2025-02-11 13:41:32 +01:00
Folke Lemaitre
6c58b67890
feat(picker.config): better source field spec 2025-02-11 13:41:32 +01:00
Folke Lemaitre
34dd83c257
fix(picker.config): use <c-w>HJKL to move float to far left/bottom/top/right. Only in normal mode. 2025-02-10 22:34:53 +01:00
Folke Lemaitre
01efab2ddb
feat(picker): each window can now be toggled (also input), hidden and have auto_hide 2025-02-10 20:26:14 +01:00
Folke Lemaitre
593adccd90
refactor(picker): refactor all the things 2025-02-10 20:26:14 +01:00
Folke Lemaitre
12a7ea28b9
feat(picker.files): added ft option to filter by extension(s) 2025-02-10 10:27:34 +01:00
Folke Lemaitre
b4cf6bb48d
feat(explorer): added Snacks.explorer.reveal() to reveal the current file in the tree. 2025-02-09 17:26:17 +01:00
Folke Lemaitre
b9900444d2
feat(picker.db): allow configuring the sqlite3 lib path. Closes #1025 2025-02-09 10:02:23 +01:00
Folke Lemaitre
9dfa276ea4
fix(explorer): change grep in item dir keymap to leader-/. Closes #1000 2025-02-08 07:26:27 +01:00
Folke Lemaitre
3baf95d3a1
feat(picker.undo): ctrl+y to yank added lines, ctrl+shift+y to yank deleted lines 2025-02-07 21:58:34 +01:00
Folke Lemaitre
a6beb0f280
feat(picker): added treesitter symbols picker 2025-02-07 21:52:00 +01:00
Folke Lemaitre
f6d9af7410
fix(picker): only show extmark errors when debug is enabled. Closes #988 2025-02-07 11:39:45 +01:00
Folke Lemaitre
2dc901634b
feat(picker): added git_grep picker. Closes #986 2025-02-07 10:41:38 +01:00
Folke Lemaitre
a3b083b844
feat(explorer): allow disabling untracked git status. Closes #983 2025-02-07 10:26:33 +01:00
Folke Lemaitre
811a24cc16
feat(picker.undo): added ctrl+y to yank added lines from undo 2025-02-07 10:21:18 +01:00
Folke Lemaitre
81f90062c5
feat(explorer): added ctrl+t to open a terminal in the item's directory 2025-02-07 09:10:10 +01:00
Folke Lemaitre
0454b21165
feat(explorer): added ctrl+f to grep in the item's directory 2025-02-07 09:07:18 +01:00
Folke Lemaitre
52c1086ecd
feat(picker): allow configuring file icon width. Closes #981 2025-02-07 09:03:20 +01:00
Folke Lemaitre
d1d55850ec
feat(explorer): added quick nav with [, ] with d/w/e for diagnostics 2025-02-07 08:59:37 +01:00
Folke Lemaitre
7f1b60d557
feat(explorer): added diagnostics file/directory status 2025-02-07 08:45:40 +01:00
Folke Lemaitre
09280078e8
feat(picker.lazy): don't use grep. Parse spec files manually. Closes #972 2025-02-07 07:16:32 +01:00
Folke Lemaitre
2b6a41b8e1
style(picker.grep): added grep debug mode 2025-02-07 06:34:45 +01:00
Folke Lemaitre
82c4a50985
feat(explorer): added support for live search 2025-02-06 10:25:39 +01:00