Michael Henry and Simon Hauser
947cb46344
fix: preserve queued keys at picker launch ( #2274 ) ( #2625 )
...
Ensure that any keystrokes that are queued at picker launch are
processed only after the picker's mode (`insert` or `normal`) has been
chosen, preserving their intended meaning.
Previously the picker's mode was set by simulating keystrokes via
`nvim_feedkeys(simulated_keypresses, "n")`. In the absence of queued
keystrokes, this works fine; but if the user is able to queue keystrokes
before the call to `nvim_feedkeys()`, those queued keystrokes are
processed before the simulated keystrokes that change the picker's mode.
Because of this unexpected ordering, the user's queued keystrokes may
appear to be ignored or may cause the picker to start in the wrong mode.
For example, consider the below normal-mode mapping:
```vim
:nnoremap <space>ff :Telescope find_files<CR>
```
Upon launching the picker via `<space>ff`, Neovim is already in normal
mode. To switch to insert mode in the picker, Telescope previously used
a call to `nvim_feedkeys("A", "n")`, simulating a keypress of `A` to
enter insert mode at the end of the current line. This `A` would not be
processed until all previously queued user keystrokes have been
processed, causing issues.
In real-world use, problems occur when the user types `<space>ff`
followed quickly by characters intended as fuzzy match text. This can
be demonstrated using `nvim_feedkeys()` as shown below.
```vim
:call nvim_feedkeys("\<space>ff" . "apple")
```
The user intended to search for `apple`, but the `a` is misinterpreted
as a request to enter insert mode at end of line, after which `pple` is
inserted; subsequently, Telescope's simulated `A` is then appended,
resulting in a search string of `ppleA`.
To ensure that Telescope's simulated keypresses are processed first, an
additional `i` flag is now passed to `nvim_feedkeys()`, causing the
simulated keypresses to be inserted at the start of the typeahead buffer
ahead of any user keystrokes.
Fixes #2274 .
(cherry picked from commit b6fccfb0f7 )
2023-09-05 16:06:14 +02:00
Andrii Berezhynskyi and Simon Hauser
dc4ea2cab4
fix: do not ignore mappings from setup() when attach_mappings provided ( #2613 )
...
(cherry picked from commit 597a3cc889 )
2023-09-05 16:05:32 +02:00
TJ DeVries and Simon Hauser
6bc7bd7c60
fix: handle non-file uris for lsp ( #2604 )
...
(cherry picked from commit 47c755d737 )
2023-09-05 16:04:18 +02:00
Stanislav Asunkin and Simon Hauser
5077c3d6e6
fix: fix builtins lazy loading ( #2590 )
...
(cherry picked from commit 0e0600908d )
2023-09-05 16:02:35 +02:00
Nghia Le Minh and Simon Hauser
11a3b16487
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 >
(cherry picked from commit 219584a6ef )
2023-09-05 16:01:35 +02:00
James Trew and Simon Hauser
50e942530e
fix(live_grep/grep_string): support non-utf8 patterns ( #2570 )
...
(cherry picked from commit ffe35cb433 )
2023-09-05 15:59:32 +02:00
Simon Hauser
776b509f80
fix(actions): which_key after mappings rework ( #2556 )
...
(cherry picked from commit 42267407ae )
2023-06-09 11:28:32 +02:00
Simon Hauser
c757f8a17d
refactor(mappings): use vim.keymap and remove __TelescopeKeymapStore ( #2551 )
...
(cherry picked from commit 991d5db624 )
2023-06-09 11:28:27 +02:00
Munif Tanjim and Simon Hauser
9b54003f5e
fix: use :botright modifier for quickfix window open ( #2554 )
...
(cherry picked from commit 9a82b5b73e )
2023-06-09 11:28:14 +02:00
Kalmander and Simon Hauser
866cd41242
fix(registers): add small delete remove black hole ( #2553 )
...
Co-authored-by: Tryggvi Kalman <tryggvikalman@protonmail.com >
(cherry picked from commit be49680937 )
2023-06-09 11:27:28 +02:00
Simon Hauser
6a169a6fe4
fix(mappings): expr for insert mode ( #2458 )
...
(cherry picked from commit 9e3922f628 )
2023-06-09 11:27:21 +02:00
Zhanibek Adilbekov and Simon Hauser
e7d17b1890
fix(bcommits): wrong selection field is used ( #2550 )
...
(cherry picked from commit 333966610c )
2023-06-09 11:27:16 +02:00
Simon Hauser and Simon Hauser
533c7fb1b3
Revert "fix: correctly restore cursor position in original window ( #2336 )" ( #2538 )
...
This reverts commit 3f1b57908b .
(cherry picked from commit eb95a31836 )
2023-05-25 07:43:48 +02:00
Simon Hauser
7c2f0f8398
fix: make sure that prompt_win is valid bevore closing it ( #2533 )
...
(cherry picked from commit ff8ed2351f )
2023-05-24 22:19:03 +02:00
Simon Hauser
a5881cffc3
fix: make sure buf is valid before updating highlighting ( #2524 )
...
(cherry picked from commit e943f93a6a )
2023-05-24 22:18:56 +02:00
Simon Hauser and Simon Hauser
ec42e02030
fix(actions): send_to_* and smart_send_to_* now append to history ( #2527 )
...
(cherry picked from commit dda9a3965b )
2023-05-24 17:09:41 +02:00
Simon Hauser and Simon Hauser
66390a6f53
fix(finder): followup to #2442 , make sure entry is not nil ( #2526 )
...
(cherry picked from commit 19e8a8ae8b )
2023-05-24 17:08:58 +02:00
cristiansofronie and Simon Hauser
be8d87b122
fix: correctly restore cursor position in original window ( #2336 )
...
(cherry picked from commit 3f1b57908b )
2023-05-24 17:08:51 +02:00
James Trew and Simon Hauser
f97f4a04f7
fix: previewers & entry maker file encoding ( #2430 )
...
(cherry picked from commit c8b65238e8 )
2023-05-24 17:08:36 +02:00
Stef and Simon Hauser
a0208d8d60
fix: always add index to entry ( #2442 )
...
59497d6 introduced `sorters.fuzzy_with_index_bias`, which gives a
scoring boost to earlier entries.
However, this sorter relies on an `index` key existing for the entry, which is
only populated by the static finder currently. We should set it from the
other finders, too.
This will allow us to use said sorter everywhere. It will also let us
replicate the behaviour of `fzf --tiebreak=index`:
```
return pickers.new(opts, {
finder = finders.new_oneshot_job(...)
sorter = telescope.extensions.fzf.native_fzf_sorter(),
tiebreak = function(current_entry, existing_entry, _)
return current_entry.index < existing_entry.index
end
}):find()
```
This gives me better results for my "recently opened files" picker.
Other builtin pickers might benefit from this, too.
(cherry picked from commit 0b891ec934 )
2023-05-24 17:07:23 +02:00
Juan Barrios and Simon Hauser
b98bc793c4
feat: sorting popup autocomplete items and initial builtin items ( #2518 )
...
(cherry picked from commit 8dd1cb2771 )
2023-05-24 17:07:01 +02:00
Azad and Simon Hauser
5caa8ab208
fix(lsp.definitions): compare file uri with targetUri ( #2514 )
...
(cherry picked from commit 233cd6ad0d )
2023-05-24 17:06:16 +02:00
Folke Lemaitre and Simon Hauser
1c951e27e1
fix: icon highlights (broken on nightly) ( #2522 )
...
(cherry picked from commit 057ee0f878 )
2023-05-24 17:06:01 +02:00
Simon Hauser and Simon Hauser
fccfbbb6a6
fix: opening file starting with a plus ( #2509 )
...
(cherry picked from commit ebf93395e7 )
2023-05-24 17:05:50 +02:00
Pete Matsyburka and Simon Hauser
a49c3aa977
fix: exclude directories from oldfiles picker ( #2485 )
...
(cherry picked from commit 0900f6fcaa )
2023-05-14 22:18:09 +02:00
KevinSilvester and Simon Hauser
ce5cc56dee
fix(preview): update mime-type check for json files ( #2221 ) ( #2480 )
...
(cherry picked from commit 89c67676a8 )
2023-05-14 22:18:03 +02:00
Hoang Nguyen and Simon Hauser
9b4a1a20c2
fix(pickers): display preview title at the same position as results title for bottom_pane layout ( #2494 )
...
(cherry picked from commit d5bef7c52d )
2023-05-14 22:06:28 +02:00
Rishikesh Vaishnav and Simon Hauser
7bcbbb853d
fix: replace default mapping rather than mapping CR directly for history and search pickers ( #2506 )
...
(cherry picked from commit 40dc952352 )
2023-05-14 22:06:22 +02:00
Nguyễn Văn Đức and Simon Hauser
341519f545
fix: flex layout strategy configurations error ( #2503 ) ( #2504 )
...
(cherry picked from commit 697c64b121 )
2023-05-14 22:06:16 +02:00
James Trew and Simon Hauser
37fa401040
Revert "chore: simplify vimgrep_arguments args ( #2440 )" ( #2488 )
...
This reverts commit cfe6df6257 .
(cherry picked from commit d77b37f452 )
2023-05-14 21:34:13 +02:00
NAKAI Tsuyoshi and Simon Hauser
05b42dab55
fix(actions): support commands with special chars ( #2224 )
...
(cherry picked from commit 713d26b985 )
2023-05-14 21:34:07 +02:00
J and Simon Hauser
f41c7e5b6d
fix(health): remove deprecated api warnings in health check ( #2478 )
...
(cherry picked from commit f2645c1320 )
2023-05-14 21:34:01 +02:00
James Trew and Simon Hauser
4f874ff4e7
fix: escape cwd symbols for async_oneshot_finder ( #2460 )
...
(cherry picked from commit 6258d50b09 )
2023-05-14 21:33:48 +02:00
James Trew and Simon Hauser
9de317bdea
fix(from_entry): escape paths with $ symbol ( #2412 )
...
Adds support for viewing File Previews of paths with dollar symbols.
(cherry picked from commit 7141515a7c )
2023-04-09 18:13:48 +02:00
Andrew Snelling and Simon Hauser
9800a1d107
chore: simplify vimgrep_arguments args ( #2440 )
...
(cherry picked from commit cfe6df6257 )
2023-04-09 17:50:59 +02:00
James Trew and Simon Hauser
5dcff772cd
fix(action): grep_string select_default with nil column ( #2447 )
...
(cherry picked from commit 031322a7c3 )
2023-04-09 17:50:44 +02:00
Safdar Awan and Simon Hauser
14ee88bc49
fix: vim.treesitter.get_query deprecated ( #2451 )
...
* fix: `vim.treesitter.get_query` deprecated
* fix: add fallback for `vim.treesitter.get_query` for stable versions of nvim
(cherry picked from commit 359e9ffc74 )
2023-04-09 17:50:37 +02:00
James Trew and Simon Hauser
54fc54fdd3
fix: icon hl width for various pickers ( #2450 )
...
(cherry picked from commit c20d4fb592 )
2023-04-09 17:50:20 +02:00
Simon Hauser
597c10f5b1
fix: icons with multiple dots but without custom overrides ( #2256 )
...
(cherry picked from commit 361a172fce )
2023-04-09 17:49:49 +02:00
Mat Jones and Simon Hauser
8f88ce978e
feat: support for multi-part file extensions like *.test.js ( #2252 )
...
(cherry picked from commit f37c603303 )
2023-04-09 17:49:21 +02:00
Pooyan Khanjankhani and Simon Hauser
818ad69723
doc: fix border characters in docs ( #2388 )
...
* chore: Fix border characters in comments
* [docgen] Update doc/telescope.txt
skip-checks: true
---------
Co-authored-by: Github Actions <actions@github>
(cherry picked from commit e504cf03c2 )
2023-04-09 10:23:54 +02:00
Rafael Bodill and Simon Hauser
83c1704be3
fix: Incorrect refine option for prompt_prefix ( #2413 )
...
(cherry picked from commit f43eb22e0c )
2023-04-09 10:23:40 +02:00
zoriya and Simon Hauser
5c06f24ed3
fix: make git_status diff works with staged files ( #2421 )
...
(cherry picked from commit eba418cca7 )
2023-04-09 10:23:32 +02:00
James Trew and Simon Hauser
0326d4679e
feat: utilize last window cursor position ( #2416 )
...
closes #2386
(cherry picked from commit 98f9d5f948 )
2023-04-09 10:23:23 +02:00
Andrii Berezhynskyi and Simon Hauser
c3b992ceba
fix: preview cycling and titles work after :Telescope resume ( #2422 )
...
(cherry picked from commit 10ebb30f0d )
2023-04-09 10:23:10 +02:00
Simon Hauser
766a45a972
fix: current_buffer_fuzzy_find highlighter ( #2394 )
...
(cherry picked from commit a486ac3e8f )
2023-02-20 22:43:58 +01:00
Simon Hauser and Simon Hauser
5d02292286
fix: previewer = true ( #2395 )
...
(cherry picked from commit 3915d933dc )
2023-02-20 15:51:56 +01:00
Luyu Huang and Simon Hauser
48ece76315
fix: apply jump_type only if the definition file is different from the current file ( #2324 )
...
(cherry picked from commit 5d9658c39d )
2023-02-19 14:12:15 +01:00
Simon Hauser
1c113b3e24
fix: current_buffer_fuzzy_find push cursor ( #2393 )
...
close #2332
(cherry picked from commit 443e5a6802 )
2023-02-19 14:10:31 +01:00
liugh and Simon Hauser
b04b051942
fix(builtin.commands): add the command w/ zero arguments to cmd history when executed ( #2320 )
...
(cherry picked from commit f409830422 )
2023-02-19 14:10:24 +01:00