Commit graph

17 commits

Author SHA1 Message Date
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
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
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
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
8e0dfd2856
fix(git): use nul char as separator for git status 2025-02-04 19:08:38 +01:00
Folke Lemaitre
9c0e2d4362
refactor(picker): pass finder context to transform 2025-01-22 23:49:56 +01:00
Folke Lemaitre
4c2827246a
refactor(picker.proc): make it easier to customize proc finders 2025-01-22 23:49:56 +01:00
Folke Lemaitre
317a2093ea
perf(picker): small optims for abort 2025-01-21 12:16:16 +01:00
Folke Lemaitre
a01e0f5368
fix(picker.proc): correct offset for carriage returns. Fixes #599 2025-01-18 09:47:11 +01:00
Folke Lemaitre
b15e2585eb
style(picker): more useful transform 2025-01-15 10:59:26 +01:00
Folke Lemaitre
559d6c6bf2
feat(snacks): added snacks.picker (#445)
## Description

More info coming tomorrow.

In short:
- very fast. pretty much realtime filtering/sorting in huge repos (like
1.7 million files)
- extensible
- easy to customize the layout (and lots of presets) with
`snacks.layout`
- simple to create custom pickers
- `vim.ui.select`
- lots of builtin pickers
- uses treesitter highlighting wherever it makes sense
- fast lua fuzzy matcher which supports the [fzf
syntax](https://junegunn.github.io/fzf/search-syntax/) and additionally
supports field filters, like `file:lua$ 'function`

There's no snacks picker command, just use lua.

```lua
-- all pickers
Snacks.picker()

-- run files picker
Snacks.picker.files(opts)
Snacks.picker.pick("files", opts)
Snacks.picker.pick({source = "files", ...})
```

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

## Todo
- [x] issue with preview loc not always correct when scrolling fast in
list (probably due to `snacks.scroll`)
- [x] `grep` (`live_grep`) is sometimes too fast in large repos and can
impact ui rendering. Not very noticeable, but something I want to look
at.
- [x] docs
- [x] treesitter highlights are broken. Messed something up somewhere

## 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. -->
2025-01-14 22:53:59 +01:00