Commit graph

1292 commits

Author SHA1 Message Date
Folke Lemaitre
0437cfd98e
feat(picker.grep): added ft (rg's type) and regex (rg's --fixed-strings) options 2025-01-15 06:34:31 +01:00
Folke Lemaitre
4a9dcdf552
docs: added example mapping to use ESC in insert mode to close 2025-01-15 00:13:16 +01:00
Folke Lemaitre
ca54948f79
feat(picker): restore cursor / topline on resume 2025-01-15 00:12:41 +01:00
Folke Lemaitre
89847bd76d
docs: more docs 2025-01-14 23:36:28 +01:00
Folke Lemaitre
e0febc4557
style(picker): visual for cursorline 2025-01-14 23:00:26 +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
Ronuk Raval
8d2e26cf27
fix(scratch): autowrite right buffer. Fixes #449. (#452)
## Description

When toggling scratch closed, it's possible for the active buffer to be
something other than the scratch buffer.

This results in the autowrite behaviour triggering a `write` for
whatever that active buffer was and leaving the scratch buffer as dirty.

## Related Issue(s)

- Fixes #449.
2025-01-13 21:52:20 +01:00
Folke Lemaitre
5affa7214f
fix(input): bring back <c-w>. Fixes #426. Closes #429 2025-01-11 17:36:03 +01:00
Folke Lemaitre
d494a9e664
feat(scroll): faster animations for scroll repeats after delay. (replaces spamming handling) 2025-01-11 12:07:15 +01:00
Folke Lemaitre
197b0a9be9
fix(animate): never animate stopped animations 2025-01-11 12:06:07 +01:00
Folke Lemaitre
ac8b3cdfa0
fix(scroll): don't animate for new changedtick. Fixes #384 2025-01-06 16:55:18 +01:00
Folke Lemaitre
7dcdcb0b6a
fix(scroll): don't animate when recording or executing macros 2025-01-06 16:54:37 +01:00
Folke Lemaitre
ee08b1f32e
fix(win): win position with border offsets. Closes #413. Fixes #423 2025-01-05 19:12:23 +01:00
Will Norris
818da334ac
fix(input): use correct highlight group for input prompt (#328)
I'm suspect this was just a typo... using the border highlight group
rather than title.
2025-01-05 06:59:00 +01:00
Folke Lemaitre
8a6e5b9685
feat(statuscolumn): allow changing the marks hl group. Fixes #390 2025-01-05 06:53:08 +01:00
Jay Madden
d312053f78
fix(dashboard): hash dashboard terminal section caching key to support long commands (#381)
## Description

This change hashes the caching key for snacks dashboards terminal
sections instead of building the key from the command itself. This
allows for arbitrary length scripts to be given as a terminal section
command instead of relying on existing commands in PATH.

## Related Issue(s)

#379 

## Screenshots

<img width="1176" alt="image"
src="https://github.com/user-attachments/assets/77a376c1-75b6-4023-8984-efd590f66a68"
/>
2024-12-31 06:24:21 +01:00
NevLext
ec346843e0
fix(lazygit): enable boolean values in config (#377)
## Description

Using boolean value inside `config` resulted in error `attempt to
concatenate a boolean value` inside `to_yaml` function.
This PR fixes it by converting boolean values to string

Example config:
```
lazygit = {
    config = {
        gui = {
            showFileTree = false,
        },
    },
},
```
## Related Issue(s)

## Screenshots

![image](https://github.com/user-attachments/assets/eea8eec6-2008-4ded-9222-6f7c9b9d4390)
2024-12-31 06:22:31 +01:00
Chris Grieser
373d0f9b6d
fix(win): backdrop having bright cell at top right (#400)
## The bug
`backdrop` displays a bright cell at the top left. upon investigation, I
figured out that it's created by the user's `colorcolumn` setting also
being applied to the backdrop.

## The fix
Disable `colorcolumn` for the backdrop window.

## Screenshots

before
![Pasted image 2024-12-27 at 14 16
40@2x](https://github.com/user-attachments/assets/8495330e-cec3-46bb-ac8c-c009865a18e3)

after
![Pasted image 2024-12-27 at 14 17
14@2x](https://github.com/user-attachments/assets/2d0b46e5-a74a-4e01-aa01-e35536eb042c)
2024-12-31 06:21:15 +01:00
Folke Lemaitre
60adc6ac8a
docs: docgen 2024-12-31 06:20:31 +01:00
Folke Lemaitre
cba16bdb35
feat(debug): system & memory metrics useful for debugging 2024-12-31 06:18:13 +01:00
Folke Lemaitre
89306308f3
fix(input): refactor for win changes and ensure modified=false. Fixes #403. Fixes #402 2024-12-31 06:17:37 +01:00
Folke Lemaitre
cc0b52872b
feat(win): better dimension calculation for windows (use by upcoming layouts) 2024-12-31 06:15:54 +01:00
Folke Lemaitre
320ecbc15c
feat(win): top,right,bottom,left borders 2024-12-31 06:15:05 +01:00
Folke Lemaitre
402494bdee
feat(win): allow setting desc for window actions 2024-12-31 06:14:20 +01:00
Folke Lemaitre
93aabee9b2
refactor(win): manage window events 2024-12-31 06:13:15 +01:00
Folke Lemaitre
4cd0647eb5
feat(win): Snacks.win:border_size 2024-12-31 06:10:03 +01:00
Folke Lemaitre
a7899f58cf
refactor(win): __index 2024-12-31 06:05:17 +01:00
Folke Lemaitre
0711a82b7a
feat(win): Snacks.win:redraw 2024-12-31 06:04:30 +01:00
Folke Lemaitre
dd50e53a9e
fix(win): force-close any buffer that is not a file 2024-12-31 06:03:48 +01:00
Folke Lemaitre
ca233c7448
fix(win): don't enter when focusable is false 2024-12-31 06:03:31 +01:00
Folke Lemaitre
a1da66e3bf
feat(win): Snacks.win:scroll 2024-12-31 06:02:36 +01:00
Folke Lemaitre
7383edaec8
feat(util): Snacks.util.ref 2024-12-31 06:01:10 +01:00
Folke Lemaitre
98403313c7
fix(util): throttle now autonatically schedules when in fast event 2024-12-31 06:00:48 +01:00
Folke Lemaitre
b93201bdf3
fix(indent): repeat_linbebreak only works on Neovim >= 0.10. Fixes #353 2024-12-20 14:31:36 +01:00
Folke Lemaitre
94ec5686a6
fix(indent): don't render scopes in closed folds. Fixes #352 2024-12-19 08:47:36 +01:00
Folke Lemaitre
c62e7a2561
fix(indent): do animate check in bufcall 2024-12-19 08:47:36 +01:00
Folke Lemaitre
2990bf0c7a
fix(input): change buftype to prompt. Fixes #350 2024-12-18 22:23:08 +01:00
Folke Lemaitre
551e644ca3
fix(indent): off-by-one for indent guide hl group 2024-12-18 21:48:50 +01:00
Folke Lemaitre
05f49814f3
fix(zen): set zindex to 40, lower than hover (45). Closes #345 2024-12-18 15:35:00 +01:00
Folke Lemaitre
282be8bfa8
fix(indent): simplify indent guide logic and never overwrite blanks. Fixes #334 2024-12-18 07:41:37 +01:00
Folke Lemaitre
fc0a99b849
fix(scroll): don't animate when leaving cmdline search with incsearch enabled. Fixes #331 2024-12-18 07:09:03 +01:00
Folke Lemaitre
eb887f4abb
style: luals 2024-12-18 07:02:08 +01:00
Folke Lemaitre
6cbdbb9afa
fix(debug): make sure debug can be required in fast events 2024-12-18 07:01:48 +01:00
Folke Lemaitre
1244305bed
fix(scope): don't expand to invalid range. Fixes #339 2024-12-18 06:59:20 +01:00
Folke Lemaitre
b6032e8f1b
fix(scroll): check for invalid window. Fixes #340 2024-12-18 06:49:07 +01:00
Folke Lemaitre
972c61cc1c
fix(indent): breakdinent 2024-12-17 07:55:32 +01:00
Folke Lemaitre
235427abcb
fix(indent): better way to deal with breakindent. Fixes #329 2024-12-17 07:35:13 +01:00
Folke Lemaitre
b70edc29db
fix(debug): make debug.inpect work in fast events 2024-12-17 07:35:13 +01:00
Folke Lemaitre
80dcb88ede
fix(words): only check modes for is_enabled when needed 2024-12-16 21:17:31 +01:00
Folke Lemaitre
58ae580c2c
fix(scope): allow treesitter scopes when treesitter highlighting is disabled. See #231 2024-12-16 18:03:24 +01:00