Commit graph

91 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
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
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
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
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
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
0d4aa98cea
feat(picker): added lsp_config source 2025-02-11 13:41:32 +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
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
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
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
82c4a50985
feat(explorer): added support for live search 2025-02-06 10:25:39 +01:00
Ian Liu
8676c409e1
feat(picker.git): add create and delete branch to git_branches (#909)
Some checks failed
CI / ci (push) Failing after 0s
## Description

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

This PR adds two actions: `git_create_branch` and `git_delete_branch`.
They are aimed to be included in the `git_branches` picker to easily
create/delete git branches with custom keymaps.

## Related Issue(s)

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

## Screenshots

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

---------

Co-authored-by: Ian Liu <ian.liu@tupl.com>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-02-05 20:01:44 +01:00
Folke Lemaitre
b07788f14a
feat(explorer): disable fuzzy searches by default for explorer since it's too noisy and we can't sort on score due to tree view 2025-02-04 22:18:43 +01:00
Folke Lemaitre
6149a7babb
feat(explorer): rewrite that no longer depends on fd for exploring 2025-02-04 17:13:06 +01:00
Folke Lemaitre
85e1b343b0
feat(explorer): add hl groups for ignored / hidden files. Closes #887 2025-02-03 11:37:14 +01:00
Folke Lemaitre
5a2056575f
feat(picker.projects): enabled frecency for projects picker 2025-02-02 22:04:36 +01:00
Folke Lemaitre
ced377a057
feat(picker.projects): added <c-t> to open a new tab page with the projects picker 2025-02-02 19:28:55 +01:00
Folke Lemaitre
3d2a07503f
feat(picker.projects): default to tcd instead of cd 2025-02-02 19:28:55 +01:00
Folke Lemaitre
7c5f9f0204
style(picker): docs to put explorer right 2025-02-02 16:58:24 +01:00
Folke Lemaitre
c2dedb647f
feat(picker.projects): allow disabling projects from recent files 2025-02-02 16:37:24 +01:00
Folke Lemaitre
6f8f0d3c72
feat(picker.projects): projects now automatically processes dev folders and added a bunch of actions/keymaps. Closes #871 2025-02-02 16:09:00 +01:00
Folke Lemaitre
d61fb453c6
feat(picker.undo): make diff opts for undo configurable 2025-02-02 09:47:13 +01:00
Folke Lemaitre
44b8e38204
feat(picker.undo): better undo tree visualization. Closes #863 2025-02-02 08:25:18 +01:00
Folke Lemaitre
263dfde1b5
feat(explorer): added ]g and [g to jump between files mentioned in git status 2025-02-01 16:59:00 +01:00
Folke Lemaitre
b40c0d4ee4
feat(explorer): hide git status for open directories by default. it's mostly redundant 2025-02-01 16:58:25 +01:00
Folke Lemaitre
2ff389312a
feat(explorer): more keymaps and tree rework. See #837 2025-02-01 10:20:03 +01:00
Folke Lemaitre
8646ba4696
feat(explorer.git): added git_status_open. When false, then dont show recursive git status in open directories 2025-01-31 21:00:24 +01:00
Folke Lemaitre
4b29ddc5d9
feat(explorer): navigate with h/l to close/open directories. Closes #833 2025-01-31 20:51:52 +01:00
Folke Lemaitre
5cae48d93c
feat(explorer): added git status. Closes #817 2025-01-31 19:08:32 +01:00
Folke Lemaitre
ae897f329f
feat(picker.lines): jump to first position of match. Closes #806 2025-01-31 14:13:36 +01:00
Folke Lemaitre
670c67366f
feat(explorer): new explorer module with shortcut to start explorer picker and netrw replacement functionlity 2025-01-31 08:31:49 +01:00
Folke Lemaitre
1a5fd93b89
fix(picker.lazy): don't use live searches. Fixes #809 2025-01-31 06:28:02 +01:00