Commit graph

12 commits

Author SHA1 Message Date
Folke Lemaitre
5f2864e8c9
style(picker): fix autogen types for select & resume 2025-02-19 19:44:52 +01:00
Folke Lemaitre
4752a87d54
docs: better doc tags. Closes #1234 2025-02-17 13:41:34 +01:00
Folke Lemaitre
766fb20bd5
ci: added picker example config to readme 2025-02-05 07:55:00 +01:00
Folke Lemaitre
8c6c54e26a
ci: auto generate picker function types 2025-02-05 07:44:26 +01:00
Folke Lemaitre
9eecf4ed85
ci: debug check works, so remove test trigger :) 2025-01-30 20:26:01 +01:00
Folke Lemaitre
c66712b6c9
ci: debug check 2025-01-30 20:25:05 +01:00
Folke Lemaitre
859af8a255
docs: add picker cmd to docs 2025-01-23 00:20:24 +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
Folke Lemaitre
05602b6caf
docs: added documentation on how to customize styles 2024-12-15 11:17:32 +01:00
Folke Lemaitre
2a664b615f
ci: try making config options optional 2024-12-13 15:58:54 +01:00
Folke Lemaitre
6ca848766c ci: docgen 2024-12-10 13:55:51 +01:00
Folke Lemaitre
22c5ffd12c refactor: move all meta stuff to snacks.meta 2024-12-10 13:55:51 +01:00
Renamed from lua/snacks/docs.lua (Browse further)