Commit graph

1292 commits

Author SHA1 Message Date
Folke Lemaitre
a01e0f5368
fix(picker.proc): correct offset for carriage returns. Fixes #599 2025-01-18 09:47:11 +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
Folke Lemaitre
74feefc522
feat(picker.smart): better frecency bonus 2025-01-17 23:46:06 +01:00
Folke Lemaitre
c434eb89fe
fix(picker.matcher): initialize matcher with pattern from opts. Fixes #596 2025-01-17 23:21:06 +01:00
Folke Lemaitre
cb845408db
fix(picker.qf): better quickfix item list. Fixes #562 2025-01-17 22:43:00 +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
Folke Lemaitre
716492c578
fix(picker): better buffer edit. Fixes #593 2025-01-17 22:32:14 +01:00
Folke Lemaitre
8293add1e5
perf(picker): dont use prompt buffer callbacks 2025-01-17 22:32:14 +01:00
Folke Lemaitre
84c3738fb0
feat(picker): added jump options jumplist(true for all), reuse_win & tagstack (true for lsp). Closes #589. Closes #568 2025-01-17 21:28:14 +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
Kristijan Husak
43c312dfc1
fix(picker): show all files in git status (#586)
## Description

When new folder is created in a git project, and there are files inside,
git status picker only shows the folder without any preview. Adding
`-uall` to the commands lists them all.

## Related Issue(s)



## Screenshots

Before: 

![screenshot_2025_01_17_15_42_14](https://github.com/user-attachments/assets/e556f563-dc63-472e-9543-bc784e6e1a35)

After: 

![screenshot_2025_01_17_15_43_13](https://github.com/user-attachments/assets/d6b6d715-02fd-4c77-b167-5c62058153dc)
2025-01-17 20:41:13 +01:00
Sergey Kochetkov
3739b5f8ff
chore(picker): fix typo (#587)
## Description

Fixed typo for the `Unknown` icon
2025-01-17 20:40:52 +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
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
9986b47707
fix(picker.config): better config merging and tests 2025-01-17 20:36:33 +01:00
Folke Lemaitre
a194bbc374
fix(picker.format): filename 2025-01-17 20:32:01 +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
b50effc967
feat(toggle): allow toggling global options. Fixes #534 2025-01-17 14:41:19 +01:00
Folke Lemaitre
192fb31c4b
feat(picker): added exclude option for files and grep. Closes #581 2025-01-17 14:35:29 +01:00
Folke Lemaitre
05eb22c4fb
fix(picker.input): leave insert mode when closing and before executing confirm. Fixes #543 2025-01-17 14:26:55 +01:00
Folke Lemaitre
27b72ecd00
fix(picker.highlight): properly deal with multiline treesitter captures 2025-01-17 13:09:28 +01:00
Folke Lemaitre
924a988d9a
feat(picker.list): better way of highlighting field patterns 2025-01-17 12:40:37 +01:00
Folke Lemaitre
fd854ab9ef
perf(picker.matcher): only use filename_bonus for items that have a file field 2025-01-17 12:39:12 +01:00
Folke Lemaitre
de01907930
fix(picker.colorscheme): nil check. Fixes #575 2025-01-17 10:03:41 +01:00
Folke Lemaitre
be421822d5
feat(picker.sources): lines just sorts by score/idx. Smart sorts on empty 2025-01-17 09:42:57 +01:00
Folke Lemaitre
ed91078625
feat(picker.matcher): added opts.matcher.sort_empty and opts.matcher.filename_bonus 2025-01-17 09:42:35 +01:00
Folke Lemaitre
d5ccb301c1
feat(picker.matcher): moved length tiebreak to sorter instead 2025-01-17 09:41:36 +01:00
Folke Lemaitre
6ae87d9f62
feat(picker.sort): default sorter can now sort by len of a field 2025-01-17 09:40:38 +01:00
Folke Lemaitre
71f69e5e57
fix(picker.db): remove tests 2025-01-17 00:21:10 +01:00
Folke Lemaitre
b7ab888dd0
fix(picker.actions): only delete empty buffer if it's not displayed in a window. Fixes #566 2025-01-17 00:10:43 +01:00
Folke Lemaitre
c43969dabd
feat(picker): use an sqlite3 database for frecency data when available 2025-01-16 23:59:08 +01:00
Folke Lemaitre
1481a90aff
fix(picker.git): git_file and git_line should only show diffs including the file. Fixes #522 2025-01-16 23:21:49 +01:00
Folke Lemaitre
df1060fa50
fix(picker.actions): added hack to make folds work. Fixes #514 2025-01-16 23:11:55 +01:00
Folke Lemaitre
566f302903
fix(words): added support for new name of the namespace used for lsp references. Fixes #555 2025-01-16 23:06:57 +01:00
Folke Lemaitre
40d08bd901
fix(picker): preview / lsp / diagnostics positions were wrong; Should all be (1-0) indexed. Fixes #543 2025-01-16 22:56:56 +01:00
Tony
9b8f57b96f
fix(bigfile): check existence of NoMatchParen before executing (#561)
## Description

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

In my config I use the following flag to disable the default
`MatchParen` plugin.

```
vim.g.loaded_matchparen = 1
```

This causes an error when `bigfile` tries to call the `NoMatchParen`
command since it does not exist.
This PR fixes that by checking for the existence of the command before
executing it.

## 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-16 22:38:14 +01:00
Folke Lemaitre
825c106f40
fix(win): correctly deal with initial text containing newlines. Fixes #542 2025-01-16 22:35:48 +01:00
Folke Lemaitre
4823f2da65
fix(picker.files): ignore errors since it's not possible to know if the error isbecause of an incomplete pattern. Fixes #551 2025-01-16 22:31:34 +01:00
Folke Lemaitre
2d4a0b594a
fix(config): dont exclude metatables 2025-01-16 22:16:32 +01:00
Folke Lemaitre
097e68fc72
fix(win): duplicate keymap should take mode into account. Closes #559 2025-01-16 22:01:56 +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
7865df0558
fix(picker): deepcopy before config merging. Fixes #554 2025-01-16 21:42:30 +01:00
Folke Lemaitre
75eb16fd9c
fix(config): better vim.tbl_deep_extend that prevents issues with list-like tables. Fixes #554 2025-01-16 21:42:04 +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
a71b7c0d26
feat(win): warn on duplicate keymaps that differ in case. See #554 2025-01-16 20:39:23 +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
f1b6c55027
fix(picker.list): possible issue with window options being set in the wrong window 2025-01-16 15:16:12 +01:00
Folke Lemaitre
5cf5ec1a31
feat(picker.score): prioritize matches in filenames 2025-01-16 14:51:28 +01:00
Folke Lemaitre
2ba5602834
fix(picker): dont fast path matcher when finder items have scores 2025-01-16 13:10:22 +01:00
Folke Lemaitre
1534f24da9
style(picker): cleanup 2025-01-16 13:03:41 +01:00