136 Commits

Author SHA1 Message Date
James Trew d54578395a fix(actions.insert_symbol): schedule to insert at correct position (#3218) 2024-07-24 01:23:46 +00:00
James Trew bfcc7d5c6f fix(action.delete_buffer): improve behavior with splits (#3194)
Previously, when having window splits, with deleting a buffer involving
deleting a window, getting the jumplist for said deleted window would
result in an invalid jumplist. Trying to iterate over this invalid
jumplist would error out.

When there are split, there's no need to find a valid buffer to switch
the current window to (as the window is deleted). Instead, what's needed
is the updating of telescope's `picker.original_win_id` state. This is
important for when chaining buffer deletes (ie. closing many splits).

Also improve behavior when the "current" buffer is the only valid buffer
-> it will now open an empty buffer (same as when doing `:bdelete`).
2024-07-01 19:06:50 +00:00
James Trew 979bfa2c44 feat(builtin.buffers): enhance and bind delete_buffer action (#3145)
* feat(builtin.buffers): enhance and bind `delete_buffer` action

* change default bind and add docs

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
2024-06-15 14:24:18 +00:00
Xavier Young 2df52609a1 feat(picker): allow appending original window <cWORD>, <cfile> and cursor line to prompt (#3134) 2024-05-27 23:02:25 +02:00
James Trew d00d9df48c fix(which_key): close window on mouse click action (#3053)
* fix(which_key): close window on mouse click action

`nvim_buf_delete` is not allowed during text change or window change.
Window switching with left mouse click was leading to race
condition/error.

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
2024-04-16 01:03:24 +00:00
Mohamad Sulton Hasanuddin a3284957d3 fix(which_key): increase zindex for popup window (#3046) 2024-04-15 23:46:49 +00:00
Hannu Hartikainen 4626aaa2bc fix(scrolling): enhance and simplify scrolling (#3028)
The previous scrolling implementation (#2687) moved the result selection
by one item at a time, which isn't technically scrolling (ie. moving the
view) and feels quite slow.

Let the neovim builtin scrolling do its thing, so using the scroll wheel
feels like scrolling and is functionally scrolling, too. Scrolling does
not move the selection so after scrolling it typically makes sense to
click. Moving the selection with keyboard takes you back to where you
were. This is in line with typical desktop user interfaces.
2024-04-02 13:36:54 +00:00
Sofronie Cristian 1bb28df3cf feat(actions): support scrolling and selecting with the mouse (#2687)
* feat(scrolling and mouse support): support scrolling and selecting with the mouse

* fix ascending sorting_strategy mouse clicks

---------

Co-authored-by: James Trew <j.trew10@gmail.com>
2024-03-30 04:05:03 +00:00
Liu 2e1e382df4 feat(action): add type into qf entry when calling entry_to_qf function (#2897) 2024-02-24 15:24:24 +01:00
James Trew 24778fd72f feat(picker): allow appending original window cword to prompt (#2878)
* feat(picker): allow appending original window cword to prompt

* add default mapping and document

* [docgen] Update doc/telescope.txt
skip-checks: true

* add mapping to README

also format README

* oops

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
2024-01-20 02:38:27 +00:00
Simon Hauser 9cf58f438f fix(config)!: fallback to vim.o.winblend (#2861) 2024-01-18 11:45:02 +01:00
Sean Mackesey ae6708a90b fix(which_key): always close on telescope prompt exit
* Add autocmd to make `which_key` window close on prompt exit

Currently `actions.which_key` supports a `close_with_action` option
(default true). When this is set, the `which_key` window will close
after any Telescope action is triggered. This makes sense. However, when
it is false, the `which_key` window remains open even after Telescope
closes. This seems like a bug.

This PR fixes this by setting an autocommand when `close_with_action` is
false to close on prompt exit.

* [docgen] Update doc/telescope.txt
skip-checks: true

* Add autocmd to make `which_key` window close on prompt exit

Currently `actions.which_key` supports a `close_with_action` option
(default true). When this is set, the `which_key` window will close
after any Telescope action is triggered. This makes sense. However, when
it is false, the `which_key` window remains open even after Telescope
closes. This seems like a bug.

This PR fixes this by setting an autocommand when `close_with_action` is
false to close on prompt exit.

---------

Co-authored-by: Github Actions <actions@github>
2023-12-25 21:01:16 +00:00
Liu 5f18f3dc51 fix(action): ensure delete_mark handles uppercase marks
* fix(action): delete_mark can not delete an uppercase named mark which
not in the current buffer

* Update init.lua

Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>

* format and lint

---------

Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>
Co-authored-by: James Trew <j.trew10@gmail.com>
2023-12-02 22:01:46 +00:00
Chen Lu e4c62dedd7 feat(actions): add delete_mark (#2769)
* feat(actions): add delete_mark

* style(init.lua): fix formatting
2023-11-26 03:37:50 +00:00
Giuseppe Rota 8c9fd22952 fix(actions): set location list title (#2741) 2023-10-23 09:57:47 +02:00
Simon Hauser 550055e640 fix: correctly create User autocmd in action.which_key (#2736) 2023-10-11 08:07:30 +02:00
Andrés Cuellar ed9574dd6d Add git_rename_branch git action (#2713) 2023-09-23 20:29:15 +00:00
James Trew 08e6d7904d feat(actions): add quickfix list autocmd event exec (#2672)
Add `QuickFixCmdPre` and `QuickFixCmdPost` event triggers to
`send_selected_to_qf` and `send_all_to_qf`
2023-09-10 12:16:48 +02:00
Sofronie Cristian 74be3c3bba fix(builtin.pickers): fix wrong picker resuming when using filtering (#2682)
When filtering is applied, `picker:get_index(picker:get_selection_row())` returns index relative to the filtered entry list rather than the original full results. This causes inaccurate indexing into the `cache_pickers` table.
2023-09-03 20:42:09 +00:00
Sergey Kuznetsov 32e6792f86 fix(actions): fix Esc in git actions confirmation (#2674)
For some git actions pressing Esc for the dialog of action confirmation
didn't cancel the action. I moved asking for confirmation to a separate
function and a bit changed notifications about canceled action.
2023-08-29 19:56:53 +00:00
Nghia Le Minh 219584a6ef fix(lsp_dynamic_workspace_symbols): add prefilter as per documentation (after to_fuzzy_refine) (#2584)
* fix(lsp_dynamic_workspace_symbols): add prefilter as per documentation (after to_fuzzy_refine)

* [docgen] Update doc/telescope.txt
skip-checks: true

* docs grammar

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
Co-authored-by: James Trew <j.trew10@gmail.com>
2023-06-24 22:11:35 +00:00
Lucía Andrea Illanes Albornoz 5fff2a138b Implements horizontal scrolling in previewer & results. (#2437)
* Implements horizontal scrolling in previewer & results.

* docs: update wrt. horizontal scrolling in previewer &  results
2023-06-24 19:17:55 +00:00
Simon Hauser 42267407ae fix(actions): which_key after mappings rework (#2556) 2023-06-08 23:10:26 +02:00
Munif Tanjim 9a82b5b73e fix: use :botright modifier for quickfix window open (#2554) 2023-06-07 23:54:23 +00:00
Zhanibek Adilbekov 333966610c fix(bcommits): wrong selection field is used (#2550) 2023-06-07 11:17:57 +02:00
Simon Hauser eb95a31836 Revert "fix: correctly restore cursor position in original window (#2336)" (#2538)
This reverts commit 3f1b57908b.
2023-05-25 07:43:19 +02:00
Simon Hauser dda9a3965b fix(actions): send_to_* and smart_send_to_* now append to history (#2527) 2023-05-24 15:25:24 +02:00
cristiansofronie 3f1b57908b fix: correctly restore cursor position in original window (#2336) 2023-05-24 14:04:27 +02:00
NAKAI Tsuyoshi 713d26b985 fix(actions): support commands with special chars (#2224) 2023-04-26 07:22:53 +03:00
Sven ccda9f02f3 feat: extend git_delete_branch to delete of all selected branches (#2337) 2023-02-19 11:42:59 +01:00
James Trew 053f2303c4 docs: proof-read edits (#2311) 2023-01-22 09:57:53 +01:00
Jieru Mei a7ede53f06 fix: checktime when git checkout (#2176) 2022-09-27 21:11:56 +02:00
Ryan Koval 2b5060362b feat: added support for tabdrop (#2143) 2022-09-04 21:47:25 +02:00
Simon Hauser 49b043e2a3 fix: nop i_<c-j> because we dont want allow new line (#2147) 2022-09-03 11:22:26 +02:00
Nicholas Hoffman bb8db6eda2 fix(which_key): mode width options typo (#2078) 2022-07-21 08:22:51 +02:00
Simon Hauser f838695459 chore: reformat with stylua 0.14.0 2022-07-07 08:27:46 +02:00
Simon Hauser 2b1da47deb chore: make to_fuzzy_refine configurable (#2034) 2022-07-03 21:39:24 +02:00
Simon Hauser a50352eb24 docs: document limitation of action
close #1994
2022-06-30 14:37:02 +02:00
TheMeaningfulEngineer a6c9ae088e feat: force buffer delete for terminal and improvements for Picker:delete_selection (#1943) 2022-06-30 14:01:50 +02:00
Simon Hauser 83b6cadb2c break: deprecate utils.get_default utils.if_nil (#1545) 2022-06-30 14:01:49 +02:00
Jędrzej Boczar 3eb90430b6 fix: error in action.close when picker.original_win_id is not valid (#1982) 2022-06-02 16:00:14 +02:00
Fabian David Schmidt ad19bf6b8e fix: cursor move in actions.insert_symbol_i (#1979) 2022-06-01 16:52:15 +02:00
Fabian David Schmidt cd9e6aaee0 fix(git_branch): fix typo in action notification (#1966) 2022-05-25 15:26:28 +02:00
fdschmidt93 b4c45e8c61 fix: exiting picker from insert mode (#1202) 2022-05-20 09:18:27 +02:00
fdschmidt93 8d1841bff5 feat: quickfixhistory picker (#1878) 2022-05-04 21:50:15 +02:00
Simon Hauser 544c5ee407 fix: termopen previewer (#1901)
- buffer leaking
- still insert mode on confirm
2022-05-01 09:46:50 +02:00
fdschmidt93 8b02088743 fix(which_key): get full path & handle table assignment of funcrefs (#1875) 2022-04-22 23:40:39 +02:00
Dave Lage 697ee7aa70 feat: lua autocmd (#1707) 2022-04-22 16:20:59 +02:00
kylo252 cc1a3440f9 fix: fix keep insert when going from telescope window to telescope window (#1600)
Also fixes `initial_mode`

Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-04-22 16:13:32 +02:00
fdschmidt93 d88094fbfd feat: show assigned function in actions.which_key (#1871) 2022-04-22 15:52:22 +02:00