Commit graph

548 commits

Author SHA1 Message Date
folke
cc04806393 chore(build): auto-generate docs 2025-03-01 08:49:34 +00:00
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
f0d34336db
fix(picker.preview): always use builtin for git log preview 2025-02-25 21:18:06 +01:00
Folke Lemaitre
e2cb9df7d0
feat(util): util method to check if ts lang is available on any Neovim version. See #1422 2025-02-25 15:25:48 +01:00
Folke Lemaitre
b0f983ef9a
fix(picker): allow overriding winhl of layout box wins. Closes #1424 2025-02-25 14:40:28 +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
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
e039139291
feat(image): configurable templates for math expressions. Closes #1338 2025-02-20 17:11:12 +01:00
Folke Lemaitre
3ae98636aa
fix(picker): update titles before showing. Closes #1337 2025-02-20 16:06:21 +01:00
Folke Lemaitre
1142f46a27
perf(explorer): only update tree when diagnostics actually changed 2025-02-20 09:54:32 +01:00
Folke Lemaitre
681ae6e307
fix(picker): don't render list when closed. See #1308 2025-02-20 08:47:58 +01:00
Folke Lemaitre
572436bc3f
fix(picker.list): allow horizontal scrolling in the list 2025-02-20 07:28:49 +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
4551f499c7
fix(picker): go back to last window on cancel instead of main 2025-02-20 06:24:06 +01:00
Folke Lemaitre
5f2864e8c9
style(picker): fix autogen types for select & resume 2025-02-19 19:44:52 +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
Folke Lemaitre
570c035b94
fix(picker.actions): better set cmdline. Closes #1291 2025-02-18 23:00:02 +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
Folke Lemaitre
f32002607a
fix(picker.git): formatting of git log 2025-02-18 21:10:25 +01:00
folke
988af56423 chore(build): auto-generate docs 2025-02-18 20:08:52 +00: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
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
f4ca368672
fix(picker.list): correct offset calculation for large scrolloff. Closes #1208 2025-02-17 14:28:34 +01:00
Folke Lemaitre
eced3033ea
feat(debug): graduate proc debug to Snacks.debug.cmd 2025-02-16 22:56:28 +01:00
Folke Lemaitre
c8285c2ca2
fix(picker.preview): don't reset preview when filtering and the same item is previewed 2025-02-16 12:39:59 +01:00
Folke Lemaitre
b02cb5e882
fix(picker.list): don't show preview when target cursor/top not yet reached. Closes #1204
Some checks failed
CI / ci (push) Failing after 0s
2025-02-15 23:16:46 +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
e35d6cd4ba
feat(image): refactor + css/html + beter image fitting 2025-02-15 14:28:49 +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
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
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
c1f4d30325
fix(picker): closed check for show preview. Closes #1181 2025-02-14 22:19:38 +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
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
7d350bc0c7
fix(buffers): use " mark for full buffer position when set. Closes #1160 2025-02-14 07:31:28 +01:00