Commit graph

27 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
bd6a62af12
feat(picker): renamed native -> builtin + fixed diff mode used for undo. Closes #1302 2025-02-19 16:56:40 +01:00
Folke Lemaitre
6c58b67890
feat(picker.config): better source field spec 2025-02-11 13:41:32 +01:00
Folke Lemaitre
593adccd90
refactor(picker): refactor all the things 2025-02-10 20:26:14 +01:00
Folke Lemaitre
27cba535a6
feat(picker): pin picker as a split to left/bottom/top/right with ctrl+z+(hjkl) 2025-02-05 07:13:15 +01:00
Folke Lemaitre
cd44efb60c
fix(picker): multi layouts that need async task work again. 2025-01-31 21:35:12 +01:00
Folke Lemaitre
e16a6a4413 feat(picker): reworked toggles (flags). they're now configurable. Closes #770 2025-01-30 17:56:14 +01:00
Folke Lemaitre
b37f368a81 feat(picker.config): added opts.config which can be a function that can change the resolved options 2025-01-30 17:56:14 +01:00
Folke Lemaitre
69c013e1b2 fix(picker.config): normalize opts.cwd 2025-01-30 17:56:14 +01:00
Folke Lemaitre
d70af2d253
fix(picker.select): allow configuring vim.ui.select with the select source. Closes #776 2025-01-29 12:49:20 +01:00
Folke Lemaitre
4e30ff0f1e
fix(picker.multi): apply source filter settings for multi source pickers. See #761 2025-01-28 14:19:25 +01:00
Folke Lemaitre
ea44a2d4c2
fix(picker.config): fix wrong opts.cwd = true config. Closes #757 2025-01-28 13:21:00 +01:00
Folke Lemaitre
8b2c78a3bf
feat(picker.multi): multi now also merges keymaps 2025-01-23 00:29:28 +01:00
Folke Lemaitre
b24886c995
refactor(picker): item.fid => item.source_id 2025-01-23 00:13:45 +01:00
Folke Lemaitre
9434986ff1
feat(picker): multi source picker. Combine multiple pickers (as opposed to just finders) in one picker 2025-01-22 23:49:56 +01:00
Folke Lemaitre
fcceedf473
refactor(picker): move resolving of preview / format to config 2025-01-22 23:49:55 +01:00
Folke Lemaitre
540ecbd9a4
fix(picker): better normkey. Fixes #610 2025-01-18 14:51:27 +01:00
Folke Lemaitre
5ac80f0159
fix(win): special handling of <C-J>. Closes #565. Closes #592 2025-01-17 20:37:55 +01:00
Folke Lemaitre
9986b47707
fix(picker.config): better config merging and tests 2025-01-17 20:36:33 +01:00
Folke Lemaitre
706b1abc16
fix(picker.config): allow merging list-like layouts with table layout options 2025-01-17 14:50:47 +01:00
Folke Lemaitre
7865df0558
fix(picker): deepcopy before config merging. Fixes #554 2025-01-16 21:42:30 +01:00
Folke Lemaitre
afef949d88
fix(picker.config): normalize keys before merging so you can override <c-s> with <C-S> 2025-01-16 20:40:16 +01:00
Folke Lemaitre
f06f14c4ae
fix(layout): allow root with relative=cursor. Closes #479 2025-01-16 09:08:19 +01:00
Folke Lemaitre
000db17bf9
feat(picker): added preliminary support for combining finder results. More info coming soon 2025-01-15 10:58:31 +01:00
Folke Lemaitre
46554a6342
fix(picker): add alias for oldfiles 2025-01-15 10:35:29 +01:00
Folke Lemaitre
5a83a8e328
feat(picker): add some source aliases like the Telescope / FzfLua names 2025-01-15 06:38:47 +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