Commit graph

21 commits

Author SHA1 Message Date
Folke Lemaitre
0d4aa98cea
feat(picker): added lsp_config source 2025-02-11 13:41:32 +01:00
Folke Lemaitre
1989921466
feat(explorer): different hl group for broken links 2025-02-04 20:04:19 +01:00
Folke Lemaitre
dfa79e0443
feat(explorer): show symlink target 2025-02-04 19:31:49 +01:00
Folke Lemaitre
85e1b343b0
feat(explorer): add hl groups for ignored / hidden files. Closes #887 2025-02-03 11:37:14 +01:00
Folke Lemaitre
5cae48d93c
feat(explorer): added git status. Closes #817 2025-01-31 19:08:32 +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
7ad414e8a9 refactor(picker): indent/hierarchy => tree 2025-01-30 17:56:14 +01:00
Folke Lemaitre
08f3c32c7d feat(picker.format): better path formatting for directories 2025-01-30 17:56:14 +01:00
Folke Lemaitre
9b80e444f5
feat(picker.actions): added separate hl group for pick win current 2025-01-29 06:42:12 +01:00
Folke Lemaitre
dcd3bc0329
fix(picker): split edit_win in {"pick_win", "jump"} 2025-01-29 00:14:14 +01:00
Folke Lemaitre
2ba5be8491
feat(picker): added edit_win action bound to ctrl+enter to pick a window and edit 2025-01-28 23:55:41 +01:00
Folke Lemaitre
97898e910d
feat(picker): added new icons picker for nerd fonts and emoji. Closes #703 2025-01-23 10:51:17 +01:00
Folke Lemaitre
2762c37eb0
feat(picker.keymaps): improvements to keymaps picker 2025-01-23 09:14:29 +01:00
Kyle Whliang
390f687431
fix(picker.git_branches): handle detached HEAD (#671)
## Description

Handle [detached
HEAD](https://git-scm.com/docs/git-checkout#_detached_head)

- list: display correct information
- preview: without error notification
- action: checkout the commit that HEAD detached at

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

- Fixes #672 

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

Before:
<img width="1308" alt="image"
src="https://github.com/user-attachments/assets/fad291a3-a730-4a2b-9eb2-4a0edd83d794"
/>

After:
<img width="1038" alt="image"
src="https://github.com/user-attachments/assets/d312579a-e12d-4286-845c-a706d91a6c95"
/>

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-01-20 20:03:38 +01:00
Folke Lemaitre
5c45f1c193
feat(picker): added undo picker to navigate the undo tree. Closes #638 2025-01-19 21:54:18 +01:00
Folke Lemaitre
8563dfce68
feat(picker): added git_branches picker. Closes #614 2025-01-19 16:24:35 +01:00
Folke Lemaitre
ee988fa4b0
feat(picker.commands): added builtin commands. Fixes #634 2025-01-19 13:01:26 +01:00
Folke Lemaitre
aa53f6c079
feat(picker): added toggle/flag/action for follow. Closes #633 2025-01-19 11:38:03 +01:00
Folke Lemaitre
2e70b7f423
feat(picker): added {preview} and {flags} title placeholders. Closes #557, Closes #540 2025-01-18 09:35:22 +01:00
Biggybi
64026877ad
feat(picker): custom icon for unselected entries (#588)
Snacks picker allows setting an icon for selected list entries.
With this PR, we can also select one for unselected entries.

I think it looks great.


![image](https://github.com/user-attachments/assets/f97543ae-b0ab-4490-9fd5-f8d8f1b804a9)

(Replica of #583 which I closed by mistake, sorry about that.)

---------

Co-authored-by: biggybi <biggybi@pm.me>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-01-17 21:05:54 +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