Commit graph

13 commits

Author SHA1 Message Date
Folke Lemaitre
cf47fa7cee
fix(picker.recent): expand to full path before normalizing. Closes #1406 2025-02-25 13:58:47 +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
c7293bdfe7
fix(picker.projects): add custom project dirs 2025-02-07 06:26:45 +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
c2dedb647f
feat(picker.projects): allow disabling projects from recent files 2025-02-02 16:37:24 +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
5f32414dd6
perf(picker.recent): correct generator for old files 2025-01-28 14:19:47 +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
c43969dabd
feat(picker): use an sqlite3 database for frecency data when available 2025-01-16 23:59:08 +01:00
Folke Lemaitre
96ffaba71b
feat(picker.recent): include open files in recent files. Closes #487 2025-01-15 17:59:01 +01:00
Folke Lemaitre
b45d12ce78
style(picker): recent is alias for recent_files 2025-01-15 10:59:04 +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