Commit graph

157 commits

Author SHA1 Message Date
Folke Lemaitre
fcceedf473
refactor(picker): move resolving of preview / format to config 2025-01-22 23:49:55 +01:00
Folke Lemaitre
efb6d1f8b8
feat(picker): syntax highlighting for command and search history 2025-01-22 23:49:55 +01:00
Folke Lemaitre
93cca7a4b3
fix(picker.input): correct cursor position in input when cycling / focus. Fixes #688 2025-01-21 18:33:45 +01:00
Folke Lemaitre
3fa2ea3115
perf(picker): gc optims 2025-01-21 18:33:13 +01:00
Folke Lemaitre
c1e2c619b2
fix(picker.async): fixed aborting a coroutine from the coroutine itself. See #665
Some checks failed
CI / ci (push) Failing after 0s
2025-01-21 12:52:36 +01:00
Folke Lemaitre
66d2854ea0
fix(picker.lsp): include_current on Windows. Closes #678 2025-01-21 12:29:39 +01:00
Folke Lemaitre
5429dff1cd
fix(picker.preview): clear buftype for file previews 2025-01-21 12:24:16 +01:00
Folke Lemaitre
317a2093ea
perf(picker): small optims for abort 2025-01-21 12:16:16 +01:00
Folke Lemaitre
964beb1148
fix(picker.util): more relaxed resolve_loc 2025-01-21 09:23:37 +01:00
Folke Lemaitre
cd5eddb1de
fix(picker): better handling of buffers with custom URIs. Fixes #677 2025-01-21 09:18:33 +01:00
Jorge Villalobos
67fbab1bf7
feat(picker.smart): add bufdelete actions from buffers picker (#679)
## Description

This enables the ability to delete buffers directly from the `smart`
picker (or other combined pickers) by adding a check + warning to the
`bufdelete` action (ensuring it only operates on buffer items), and
adding the same `dd` and `<c-x>` mappings as the `buffers` picker.

## Related Issue(s)

TBD... searching.

## Screenshots


https://github.com/user-attachments/assets/6c5c4b5e-74ed-4778-9f31-a714f7da1853
2025-01-21 08:43:37 +01:00
Folke Lemaitre
2cac6678a9
fix(picker.git): parse all detached states. See #671 2025-01-21 08:42:12 +01:00
Folke Lemaitre
2c2ff4caf8
feat(picker): getters and setters for cwd 2025-01-20 20:20:46 +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
ea665ebad1
feat(picker): persistent history. Closes #528 2025-01-20 18:30:52 +01:00
Folke Lemaitre
8d9677fc47
feat(picker.debug): more info about potential leaks 2025-01-20 16:57:49 +01:00
Folke Lemaitre
23a8668ef0
fix(picker.git): --follow only works for git_log_file. Closes #666 2025-01-20 16:04:41 +01:00
Folke Lemaitre
384b9a7a36
fix(picker.preview): disable relativenumber by default. Closes #664 2025-01-20 13:13:52 +01:00
Folke Lemaitre
5e00b0ab27
feat(picker.matcher): new opts.matcher.file_pos which defaults to true to support patterns like file:line:col or file:line. Closes #517. Closes #496. Closes #651 2025-01-20 11:40:06 +01:00
Folke Lemaitre
f0d51ce038
fix(picker.grep): debug 2025-01-20 11:03:53 +01:00
Folke Lemaitre
0ac5605bfb
fix(picker.buffer): unselect on delete. Fixes #653 2025-01-20 10:53:04 +01:00
Folke Lemaitre
8601a8ced3
fix(picker.grep): correctly insert args from pattern. See #601 2025-01-20 10:37:00 +01:00
Folke Lemaitre
6b7705c7ed
fix(picker.util): relax pattern for args 2025-01-20 10:37:00 +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
b59f4ff477
feat(picker.debug): debug option to detect garbage collection leaks 2025-01-20 10:30:45 +01:00
Folke Lemaitre
3df2408713
fix(picker.lsp): backward compat with Neovim 0.95 2025-01-20 10:14:28 +01:00
Folke Lemaitre
d0a0046e37
fix(picker.lsp): lazy resolve item lsp locations. Fixes #650 2025-01-20 09:56:12 +01:00
Folke Lemaitre
2ff21b4394
fix(picker.util): item.resolve for nil item 2025-01-20 00:11:36 +01:00
Folke Lemaitre
e50f2e3909
fix(picker.preview): reset before notify 2025-01-19 23:40:37 +01:00
Folke Lemaitre
40cea79697
fix(picker.undo): disable number and signcolumn in preview 2025-01-19 23:40:36 +01:00
Folke Lemaitre
774e4ff302
refactor(picker.preview): set_lines 2025-01-19 23:40:36 +01:00
Folke Lemaitre
83baea06d6
feat(picker.buffer): add filetype to bufname for buffers without name 2025-01-19 23:40:36 +01:00
Folke Lemaitre
da5556aa6b
fix(picker.preview): off-by-one for cmd output 2025-01-19 23:40:36 +01:00
Folke Lemaitre
70106a7930
fix(picker.buffers): add buf number to text 2025-01-19 22:34:57 +01:00
Folke Lemaitre
781b6f6ab0
feat(picker): added args option for files and grep. Closes #621 2025-01-19 22:01:23 +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
b0d3266985
feat(picker): added support for item.resolve that gets called if needed during list rendering / preview 2025-01-19 21:53:18 +01:00
Folke Lemaitre
eb0e5b7efe
fix(picker.lsp.symbols): only include filename for search with workspace symbols
Some checks failed
CI / ci (push) Failing after 0s
2025-01-19 18:30:18 +01:00
Folke Lemaitre
d6284d51ff
fix(picker.input): use Snacks.util.wo instead of vim.wo. Fixes #643 2025-01-19 18:19:32 +01:00
Folke Lemaitre
79d27f19dc
fix(picker.lsp): added support for single location result 2025-01-19 18:14:06 +01:00
Folke Lemaitre
4d8d844027
fix(picker.input): statuscolumn on resize / re-layout. Fixes #643 2025-01-19 18:03:19 +01:00
Folke Lemaitre
50f3c3e5b1
feat(picker): added support for live args for grep and files. Closes #601 2025-01-19 17:54:25 +01:00
Folke Lemaitre
dc3f114c1f
fix(picker): add keymaps for preview scratch buffers 2025-01-19 17:33:57 +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
29becb0ecb
fix(picker): always stopinsert, even when picker is already closed. Should not be needed, but some plugins misbehave. See #579 2025-01-19 16:46:53 +01:00
Folke Lemaitre
c6c76a6aa3
fix(picker.diagnostics): sort on empty pattern. Fixes #641 2025-01-19 16:27:19 +01:00
Folke Lemaitre
8563dfce68
feat(picker): added git_branches picker. Closes #614 2025-01-19 16:24:35 +01:00
Folke Lemaitre
903431903b
fix(picker.git): git log file/line for a file not in cwd. Fixes #616 2025-01-19 14:22:30 +01:00
Folke Lemaitre
b170ced527
feat(picker): added spelling picker. Closes #625 2025-01-19 14:02:18 +01:00
Folke Lemaitre
ee988fa4b0
feat(picker.commands): added builtin commands. Fixes #634 2025-01-19 13:01:26 +01:00