Commit graph

203 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
91c3da0b4b
fix(picker.buffers): add a flag when buffer is visible in a window. See #1417 2025-02-25 14:29:37 +01:00
Folke Lemaitre
cf47fa7cee
fix(picker.recent): expand to full path before normalizing. Closes #1406 2025-02-25 13:58:47 +01:00
Folke Lemaitre
1142f46a27
perf(explorer): only update tree when diagnostics actually changed 2025-02-20 09:54:32 +01:00
Folke Lemaitre
63277f96c9
refactor(compat): use svim.islist 2025-02-20 07:00:05 +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
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
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
Folke Lemaitre
b65178b470
feat(image): show progress indicator when converting image files 2025-02-17 23:56:55 +01:00
Folke Lemaitre
c3419cbf8b
refactor(image): use multi spawn 2025-02-17 23:13:12 +01:00
Folke Lemaitre
eced3033ea
feat(debug): graduate proc debug to Snacks.debug.cmd 2025-02-16 22:56:28 +01:00
Folke Lemaitre
c114a0da1a
fix(picker.git): correct root dir for git log 2025-02-15 12:06:25 +01:00
Folke Lemaitre
2e284e23d9
fix(picker.git): apply args to git, and not git grep. 2025-02-15 10:36:38 +01:00
Folke Lemaitre
9c436cb273
fix(picker.git): properly handle file renames for git log. Closes #1154 2025-02-15 08:06:07 +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
f3cdd02620
fix(picker.lsp): handle invalid lsp kinds. Closes #1182 2025-02-14 22:52:56 +01:00
Folke Lemaitre
45a6f8d1ee
feat(picker.lsp): added original symbol to item.item. Closes #1171 2025-02-14 17:22:09 +01:00
Folke Lemaitre
7d350bc0c7
fix(buffers): use " mark for full buffer position when set. Closes #1160 2025-02-14 07:31:28 +01:00
Salomon Popp
885c1409e8
fix(picker.explorer): ensure diagnostics can be disabled (#1145)
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. -->

`opts.diagnostics=false` was being ignored by `Snacks.picker.explorer`

## Related Issue(s)

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

I didn't create an issue for it

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-02-13 21:07:41 +01:00
Salomon Popp
c0481ab0b6
feat(picker): add LSP symbol range to result item (#1123)
## Description

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

this adds an attribute for the range of the LSP symbol to each picker
item.

## Related Issue(s)

Fixes #1057 

having access to the range of the LSP symbol (i.e. the whole context of
classes and methods) would be tremendously helpful for my solution in
https://github.com/folke/snacks.nvim/issues/1057#issuecomment-2652052218.
Currently the picker items only have a `loc` attribute which holds the
range of the symbol identifier, i.e. the class/method name.

---

perhaps in a followup we could use the range to highlight the symbol
context, similar to how trouble.nvim does it

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-02-13 12:04:55 +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
95a300ebaa
refactor(proc): better proc debug 2025-02-12 08:21:22 +01:00
Folke Lemaitre
b94926e5cc
fix(picker.proc): make sure to emit the last line when done. Closes #1095 2025-02-12 07:32:42 +01:00
Folke Lemaitre
d870f16453
feat(picker.proc): added proc debug mode 2025-02-12 07:32:42 +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
d607d2e050
fix(picker.lsp): only sort when not getting workspace symbols. Closes #1071 2025-02-11 10:18:20 +01:00
Folke Lemaitre
12a7ea28b9
feat(picker.files): added ft option to filter by extension(s) 2025-02-10 10:27:34 +01:00
qw457812
33dbebb753
fix(picker.zoxide): directory icon (#1031)
## Description

Fix the icon for `Snacks.picker.zoxide()`.

## Related Issue(s)

None.

## Screenshots

Before:

<img width="1168" alt="image"
src="https://github.com/user-attachments/assets/1c0fd481-eaa7-4bcd-8a1c-a45df35c512e"
/>

After:

<img width="1168" alt="image"
src="https://github.com/user-attachments/assets/b67d135d-350b-462b-b630-7801063295ac"
/>
2025-02-09 15:46:56 +01:00
Folke Lemaitre
7ccf9c9d69
fix(picker.lines): use original buf instead of current (which can be the picker on refresh) 2025-02-08 17:21:04 +01:00
Folke Lemaitre
93ad23a0ab
fix(picker.git): handle git status renames. Closes #1003 2025-02-08 10:45:17 +01:00
Folke Lemaitre
e9e2e6976e
fix(picker.git): account for deleted files in git diff. Closes #1001 2025-02-08 07:12:31 +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
3b7021e7fd
fix(picker.proc): don't close stdout on proc exit, since it might still contain buffered output. Closes #966 2025-02-07 16:50:51 +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
bc087d36d6
perf(explorer): no need to get git status with -uall. Closes #983 2025-02-07 09:54:04 +01:00
Folke Lemaitre
17360e4009
fix(picker.lsp): fix indent guides for sorted document symbols 2025-02-07 09:24:55 +01:00
Folke Lemaitre
cc22177dcf
fix(picker.lsp): sort document symbols by position 2025-02-07 09:14:07 +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
c7293bdfe7
fix(picker.projects): add custom project dirs 2025-02-07 06:26:45 +01:00
Folke Lemaitre
b9a17d82a7
fix(explorer): disable follow for explorer search by default. No longer needed. Link directories may show as files then though, but that's not an issue. See #960 2025-02-07 06:19:40 +01:00
Folke Lemaitre
ba8badfe74
fix(picker.colorscheme): use wildignore. Closes #969 2025-02-06 21:39:03 +01:00
Folke Lemaitre
a0bee9f662
fix(explorer): call original on_close. Closes #971 2025-02-06 21:34:14 +01:00