Commit graph

42 commits

Author SHA1 Message Date
Folke Lemaitre
f32002607a
fix(picker.git): formatting of git log 2025-02-18 21:10:25 +01:00
Folke Lemaitre
41c4391b72
feat(picker): allow overriding default file/dir/dir_open icons. Closes #1199 2025-02-15 15:59:26 +01:00
Folke Lemaitre
243eecaca5
feat(picker.format): opts.formatters.file.use_git_status_hl defaults to true and adds git status hl to filename 2025-02-14 07:39:00 +01:00
Folke Lemaitre
93ad23a0ab
fix(picker.git): handle git status renames. Closes #1003 2025-02-08 10:45:17 +01:00
Folke Lemaitre
52c1086ecd
feat(picker): allow configuring file icon width. Closes #981 2025-02-07 09:03:20 +01:00
Folke Lemaitre
7f1b60d557
feat(explorer): added diagnostics file/directory status 2025-02-07 08:45:40 +01:00
Folke Lemaitre
a542ea4d34
fix(picker.list): better wrap settings for when wrapping is enabled 2025-02-06 11:37:20 +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
hankertrix
d897ead2b7
fix(picker.git_log): add extra space between the date and the message (#885)
## Description

Add additional space between the date of the commit and the commit
message so that the message is more readable. Also added support for
spaces between the type and the scope of the commit.

## Screenshots

Before:


![image](https://github.com/user-attachments/assets/446480cd-0165-4421-9e63-29bfc7188011)


![image](https://github.com/user-attachments/assets/d75fbe6c-394e-4d97-aad9-ca3e7d3cd35c)

After:


![image](https://github.com/user-attachments/assets/8f1ac512-d723-4f5b-81de-000d794ad7a4)


![image](https://github.com/user-attachments/assets/273a0cac-c927-4ad2-9b51-737daa60c56a)
2025-02-03 09:03:15 +01:00
Folke Lemaitre
44b8e38204
feat(picker.undo): better undo tree visualization. Closes #863 2025-02-02 08:25:18 +01:00
Folke Lemaitre
5cae48d93c
feat(explorer): added git status. Closes #817 2025-01-31 19:08:32 +01:00
Folke Lemaitre
dad3e00e83
fix(picker.format): extra slash in path 2025-01-31 17:09:08 +01:00
Folke Lemaitre
e784a9e672
fix(picker.format): use item.file for filename_only 2025-01-31 06:55:52 +01:00
Folke Lemaitre
847509e12c feat(picker.format): directory formatting 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
4179fc11ec refactor(picker.format): remove redundant depth and addes support for indent guides to file formatter 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
32cffd2e60
feat(picker): added notifications picker. Closes #738 2025-01-28 17:16:32 +01:00
Folke Lemaitre
bb3db117a4
feat(picker): added git_stash picker. Closes #762 2025-01-28 16:05:30 +01:00
Folke Lemaitre
0396bdfc3e
feat(picker.format): filename_only option 2025-01-23 19:52:01 +01:00
Folke Lemaitre
51adb6792e
fix(picker): don't jump to invalid positions. Fixes #712 2025-01-23 12:43:33 +01:00
Folke Lemaitre
bab8243395
feat(picker.util): smart path truncate. Defaults to 40. Closes #708 2025-01-23 12:00:08 +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
Folke Lemaitre
5778234e39
feat(picker.help): add more color to help tags 2025-01-22 23:49:56 +01:00
Folke Lemaitre
efb6d1f8b8
feat(picker): syntax highlighting for command and search history 2025-01-22 23:49:55 +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
348307a82e
feat(picker.lsp): added lsp_workspace_symbols. Supports live search. Closes #473 2025-01-19 17:29:37 +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
5f82ffde0b
fix(picker.format): use forward slashes for paths. Closes #624 2025-01-19 11:27:18 +01:00
Biggybi
d7f727f673
fix(picker): format: one too many spaces for default icon in results … (#594)
The default icon returned from Snacks utils already has a space for
padding.

The fix is to only append a space if there's none.


![image](https://github.com/user-attachments/assets/547ee166-ef4c-48b9-ad14-01563c630bc8)

Co-authored-by: biggybi <biggybi@pm.me>
2025-01-17 22:36:06 +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
a194bbc374
fix(picker.format): filename 2025-01-17 20:32:01 +01:00
Folke Lemaitre
924a988d9a
feat(picker.list): better way of highlighting field patterns 2025-01-17 12:40:37 +01:00
Folke Lemaitre
f351dcfcac
fix(picker): correctly normalize path after fnamemodify 2025-01-16 08:56:57 +01:00
Folke Lemaitre
98562ae6a1
feat(pickers.format): added opts.picker.formatters.file.filename_first 2025-01-15 19:50:52 +01:00
Folke Lemaitre
76fbf9e8a8
feat(picker): allow disabling file icons 2025-01-15 09:33:18 +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