Commit graph

25 commits

Author SHA1 Message Date
Folke Lemaitre
3ae98636aa
fix(picker): update titles before showing. Closes #1337 2025-02-20 16:06:21 +01:00
Folke Lemaitre
72ffb3d1a2
fix(layout): zindex weirdness on stable. Closes #1180
Some checks failed
CI / ci (push) Failing after 0s
2025-02-15 00:45:11 +01:00
Folke Lemaitre
27256cf989
fix(layout): deep merge instead of shallow merge for window options. Closes #1166 2025-02-14 12:38:45 +01:00
Folke Lemaitre
c5540974fa
fix(layout): make sure width/height are at least 1. Closes #1090 2025-02-12 08:04:39 +01:00
Folke Lemaitre
0dab071dba
fix(layout): just hide any layouts below a backdrop. easier and looks better. 2025-02-11 19:53:20 +01:00
Folke Lemaitre
593adccd90
refactor(picker): refactor all the things 2025-02-10 20:26:14 +01:00
Folke Lemaitre
8272c1c66f
fix(all): better support for opening windows / pickers / ... on multiple tab pages. Closes #1043 2025-02-10 11:24:13 +01:00
Folke Lemaitre
e4e5040d9b
fix(layout): take winbar into account for split layouts. Closes #996 2025-02-08 07:19:30 +01:00
Folke Lemaitre
c8430fdd8d
fix(win): better handling of alien buffers opening in managed windows. See #886 2025-02-03 10:41:16 +01:00
Folke Lemaitre
c955a8d1ef
fix(layout): destroy in schedule. Fixes #861 2025-02-01 21:11:57 +01:00
Folke Lemaitre
692aeaf131
chore: remove debug 2025-01-31 19:28:28 +01:00
Folke Lemaitre
ab8af1bb32
fix(layout): adjust zindex when needed when another layout is already open. Closes #826 2025-01-31 19:26:02 +01:00
Folke Lemaitre
47993f9a80
fix(picker.preview): properly refresh the preview after layout changes. Fixes #802 2025-01-30 22:18:33 +01:00
Folke Lemaitre
c8ce9e2b33 fix(layout): better handling of resizing of split layouts 2025-01-30 17:56:14 +01:00
Folke Lemaitre
115f8c6ae9 feat(layout): make fullscreen work for split layouts 2025-01-30 17:56:14 +01:00
Folke Lemaitre
696d1981b1 fix(layout): make sure split layouts are still visible when a float layout with backdrop opens 2025-01-30 17:56:14 +01:00
Folke Lemaitre
b50d697ce4 fix(layout): better update check for split layouts 2025-01-30 17:56:14 +01:00
Folke Lemaitre
215ae72daa
fix(picker.layout): make split layouts work in layout preview 2025-01-29 18:19:58 +01:00
Folke Lemaitre
6da592e130
feat(layout): added support for split layouts (root box can be a split) 2025-01-29 18:01:30 +01:00
Folke Lemaitre
eebf44a34e
perf(picker): fixed some issues with closed pickers not always being garbage collected 2025-01-20 10:30:45 +01:00
Folke Lemaitre
034d50d44e
fix(layout): open/update windows in order of the layout to make sure offsets are correct 2025-01-17 20:37:00 +01:00
Folke Lemaitre
f7d967c515
fix(layout): use eventignore when updating windows that are already visible to fix issues with synatx. Fixes #552 2025-01-16 21:49:51 +01:00
Folke Lemaitre
d73a4a64df
fix(layout): don't trigger events during re-layout on resize. Fixes #552 2025-01-16 20:10:01 +01:00
Folke Lemaitre
f06f14c4ae
fix(layout): allow root with relative=cursor. Closes #479 2025-01-16 09:08:19 +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