Commit graph

20 commits

Author SHA1 Message Date
Folke Lemaitre
bc902f7032
feat(compat): added svim, a compatibility layer for Neovim. Closes #1321 2025-02-20 06:59:44 +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
270250cf46
fix(picker.projects): use fd or fdfind 2025-02-06 19:25:44 +01:00
Folke Lemaitre
8c6c54e26a
ci: auto generate picker function types 2025-02-05 07:44:26 +01:00
Folke Lemaitre
455228ed3a
feat(rename): add old to on_rename callback 2025-02-04 17:10:55 +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
8f87c2c32b
perf(picker.files): no need to check every time for cmd availability 2025-02-01 16:37:50 +01:00
Folke Lemaitre
3e1dc300cc feat(picker.files): allow forcing the files finder to use a certain cmd 2025-01-30 17:56:14 +01:00
Folke Lemaitre
dc9c6fbd02
fix(picker.files): include symlinks 2025-01-23 14:37:09 +01:00
Folke Lemaitre
9d5d3bdb17
feat(picker): added opts.rtp (bool) to find/grep over files in the rtp. See #680 2025-01-23 13:03:27 +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
caf20764f1
refactor(picker.finder): function signature of finders changed to fun(opts, ctx) 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
781b6f6ab0
feat(picker): added args option for files and grep. Closes #621 2025-01-19 22:01:23 +01:00
Folke Lemaitre
50f3c3e5b1
feat(picker): added support for live args for grep and files. Closes #601 2025-01-19 17:54:25 +01:00
Folke Lemaitre
192fb31c4b
feat(picker): added exclude option for files and grep. Closes #581 2025-01-17 14:35:29 +01:00
Folke Lemaitre
4823f2da65
fix(picker.files): ignore errors since it's not possible to know if the error isbecause of an incomplete pattern. Fixes #551 2025-01-16 22:31:34 +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