Commit Graph

262 Commits

Author SHA1 Message Date
fdschmidt93
a1aec79cb1 feat: none strategy & control attachment (#1867) 2022-06-30 14:01:49 +02:00
Fabian David Schmidt
ad19bf6b8e fix: cursor move in actions.insert_symbol_i (#1979) 2022-06-01 16:52:15 +02:00
fdschmidt93
b4c45e8c61 fix: exiting picker from insert mode (#1202) 2022-05-20 09:18:27 +02:00
dagle
3cc44f8f05 fix: set tagstack when we jump with lsp in telescope (#1887)
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-05-18 19:59:12 +02:00
TJ DeVries
0b5f1d69d7 feat: Add ability to choose window to edit (#745) 2022-05-15 22:08:16 +02:00
Simon Hauser
4681dcdffe fix: another teardown issue (#1918) 2022-05-05 10:05:37 +02:00
fdschmidt93
c93276acd3 fix: initial mode setting issues (#1917) 2022-05-04 15:00:28 +02:00
fdschmidt93
80e4313cc8 Revert "fix(pickers): misc initial_mode setting fixes (#1895)" (#1914)
Reverts circumventing A for initial_mode insert as many more users have issues with the current (failed attempt at a) fix
2022-05-03 18:36:45 +02:00
fdschmidt93
e454a0ad37 fix(pickers): misc initial_mode setting fixes (#1895) 2022-05-03 08:53:22 +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
4449f709c3 fix(finder): don't trigger twice w/ inital_mode="insert" (#1886) 2022-04-27 12:33:49 +02:00
Simon Hauser
2b8c7b1ec7 fix: prompt now has always buftype prompt
fix #1882
2022-04-26 08:49:16 +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
92019d5053 fix: extra finder loop on refresh w/ reset prompt (#1860) 2022-04-20 20:34:39 +02:00
Simon Hauser
66c3e2a351 fix: error if telescope is being opened from command-line window
This is impossible see `:help E11`
Close #1810
2022-04-17 16:32:47 +02:00
Simon Hauser
c8ef91a052 fix: displayer when tabs are used and ts is != 1 (#1845) 2022-04-17 15:59:46 +02:00
Joshua Cao
8af0d384d2 fix: save position into jumplist before 'edit' action (#1234)
currently enabled for some builtins. You can manually enable it by adding `push_cursor_on_edit = true` to the builtin options. But feel free to open a PR if you find a builtin that needs this option enabled.
2022-04-08 20:09:58 +02:00
Michael Benford
317371d37c feat: global configuration of results_title and prompt_title (#1817) 2022-04-08 18:17:54 +02:00
Simon Hauser
40c1e88904 chore: fix lint errors from latest ci run 2022-03-26 10:25:47 +01:00
Simon Hauser
df303e12e0 hotfix: scrolling should work correctly again 2022-03-13 20:21:14 +01:00
Simon Hauser
2532b98d67 fix: selection strategy madness if its not set to reset (#1559)
* fix: selection strategy madness when its not row

* fix: selection_strategy row
2022-03-13 20:04:32 +01:00
Simon Hauser
9f0dd2e402 fix: action mt again (#1487)
actions should be concatinable again
2022-03-13 19:22:16 +01:00
Fabio Manganiello
c5bf83dc61 fix: allow Number type should be allowed for option keys (#1782)
* Number type should be allowed for option keys

Some extension (e.g. `dap`) use integer numbers for their selector
options instead of strings. Before this commit, the interface for these
plugins breaks when using `ui-select` with a stack trace like the
following:

Error detected while processing function StartDebugger:
line   33:
E5108: Error executing lua .../telescope.nvim/lua/telescope/pickers.lua:1359: Should be string, found: number
stack traceback:
        [C]: in function 'assert'
        .../.vim/bundle/telescope.nvim/lua/telescope/pickers.lua:1359: in function 'new'
        ...e-ui-select.nvim/lua/telescope/_extensions/ui-select.lua:22: in function 'pick_one'
        .../nvim-dap/lua/dap/ui.lua:32: in function 'pick_if_many'
        .../nvim-dap/lua/dap.lua:225: in function 'select_config_and_run'
        .../nvim-dap/lua/dap.lua:551: in function 'continue'
        [string ":lua"]:1: in main chunk

* style

Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-03-11 12:49:55 +01:00
Tor Bratsberg
6d5634b477 fix: error on toggling selection with empty picker (#1786) 2022-03-10 21:23:27 +01:00
Sultanahamer
df0b35c8bc feat: allow user to wrap picker results (#701, #1296) (#1735) 2022-02-15 08:51:56 +01:00
Luke Kershaw
1ec682b29d fix: always update preview when _selection_entry changes (#1693) 2022-01-18 07:45:03 +01:00
Luke Kershaw
2bfc0eb2cf fix: update multi_icon with select/drop/toggle_all actions (#1682)
* fix: `multi_icon` with `select/drop/toggle_all`

* typos

* fix: add check for no caret found

* fix: add check for no line found

* fix: check `max_results` in `Picker:can_select_row`

- also switch order of highlighting in `select/drop/toggle_all` actions

* fix: make `max_results` check a strict inequality

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

* fix: update `prompt_status` on `select/drop/toggle_all` actions

Co-authored-by: Github Actions <actions@github>
2022-01-15 22:27:03 +00:00
Luke Kershaw
e8ccd47c4f feat: adds multiselect counter in prompt status_text (#1614) 2022-01-14 18:02:24 +01:00
Julian Fricker
5060f3f0ab feat: tiebreak config function (#1401)
Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
2022-01-09 19:43:06 +01:00
Luke Kershaw
f285599440 feat: multiselect icon (#1572)
* feat: add `multi_icon` option to pickers and corresponding highlight

* feat: allow `multi_icon` to be any length

* fix: adjust `selection_caret` highlighting
2022-01-05 22:42:29 +00:00
Luke Kershaw
c5aad43558 fix: check if status.preview_bufnr is nil before checking if valid (#1657) 2022-01-05 21:06:14 +00:00
Luke Kershaw
e9759b0405 docs: functions in pickers.lua (#1554) 2021-12-05 08:45:50 +00:00
Simon Hauser
4e075bf924 feat: highlight group for counter: TelescopePromptCounter
fix #1540
2021-12-03 14:36:32 +01:00
Martin Roa Villescas
ef245548a8 docs: fix Picker:get_row(index) doc string (#1515) 2021-11-30 21:27:20 +01:00
Luke Kershaw
c9439871ef fix: keep previewer winid state updated on layout changes (#1522) 2021-11-30 21:15:43 +01:00
max397574
c1951b3722 add Normal highlights for prompt and results (#1514)
* feat(highlight): add Normal highlights for prompt and results

* fix(highlight): link to TelescopeNormal by default
2021-11-29 21:47:19 +00:00
akiyosi
ed4adba6d0 fix: Border window also need to be winblend due to window overlap in multigrid UI (#1421) 2021-11-28 09:57:08 +00:00
Simon Hauser
1c57cc6140 Revert "fix: action mt so we can again concat actions from two different tables (#1143)" (#1486)
This reverts commit 6daf35c88c.
2021-11-23 23:51:25 +01:00
Simon Hauser
7695d224c8 fix: telescope close process and cleanup layout actions (#1480) 2021-11-23 21:11:05 +01:00
Simon Hauser
6daf35c88c fix: action mt so we can again concat actions from two different tables (#1143)
* fix: action mt so we can again concat actions from two different tables

- without actually changing the public interface
- without having a local table that keeps track of all actions

* this should clear actions now

we never actually called this function which is kinda a problem because
we never cleaned up previous mapping stores.
We can also make a better mappings store which has access to the keys
sequences which would help the showing actions part

* bugfix

* that should now clear everything

only tests left i think

* more tests

* cleanup

* hack: make sure all actions get cleared
2021-11-22 20:48:37 +01:00
Salomon Popp
6f82c6630c fix: error when opts is nil in pickers.new (#1471) 2021-11-20 16:07:52 +01:00
Luke Kershaw
d686fb2799 fix: cleanup of layout actions
* fix: finish docs and remove mistakes from merge

* fix: change order of `popup` changes based on type of change
  - removes "flash" issue where popups don't update in sync
2021-11-18 19:44:12 +00:00
Luke Kershaw
edcf07cf88 feat: layout actions (#1383)
Co-authored-by: johnybx <johnybx@users.noreply.github.com>
2021-11-18 19:44:12 +00:00
johnybx
b952c2f852 feat: add hide / unhide preview (#1305)
* feat: add hide / unhide preview or results and prompt

* fix edit actions while only preview window is active

* add option to start telescope without previewer -> "disable_previewer_at_startup"

* remove hide / unhide prompt and resutls, improve hide / unhide preview

* fix tests - check if popup window should be created with borders - popup.create does not support setting borderhighlight and border=false

* allow toggle preview even if preview is set to false

* reuse recalculate_layout in hide / unhide preview

* add docs to toggle preview

* check if preview window is valid window

* remove unnecessary changes

* cleanup, remove unnecessary changes

* close all previewers, refactor toggle preview code

[docgen] Update doc/telescope.txt
skip-checks: true
2021-11-18 19:44:12 +00:00
TJ DeVries
9ac89ebf67 Fixes #1371
Force clearing the highlights while the picker is still open
2021-11-15 15:50:23 -05:00
fdschmidt93
404d2b5f10 feat: allow changing results/prompt title & persisting multi on picker:refresh (#1451) 2021-11-15 17:58:43 +01:00
Simon Hauser
587a10d149 chore: remove a lot of deprecated stuff (#1399) 2021-11-01 20:30:10 +01:00
Luke Kershaw
c08f95823d fix: check if caret is present before removal (#1390) 2021-10-31 15:52:09 +00:00
Luke Kershaw
02a02f7bcd fix: set preview titlehighlight when re-enabling preview (#1384) 2021-10-28 14:21:09 +01:00