Commit Graph

43 Commits

Author SHA1 Message Date
James Trew
dc6fc321a5 fix(grep_string): cast search value to string (#3319)
When using the vim command API and passing a number to the `search`
option of `grep_string` (eg. `:Telescope grep_string search=3`), the
number is passed as a number. This eventually causes a type error at
`string.gsub` as the `search` value is expected to be a string.

We'll just cast `search` value to a string.
2024-10-06 02:11:05 +00:00
James Trew
bc4e7e4503 fix(current_buffer_fuzzy_find): push cursor on edit (#3219)
Setting `push_cursor_on_edit = true` wasn't actually doing anything as
the picker replaces `select_default`.

Instead, call `normal! m'` manually in the replacement `select_default`.
2024-07-24 03:22:00 +00:00
ash
af78ba3b7d fix(builtin): grep/treesitter push cursor on edit (#3175)
* fix(builtin.live_grep, builtin.treesitter): not adding jumps to jumplist

Whenever a picker, that can jump to a different location in the same buffer does so it should have `push_cursor_on_edit` otherwise the jump won't be recorded.

Maybe this affects other pickers too, but I only noticed it on grep and treesitter since I use those two a lot.

* fix(builtin.grep_string): not adding jumps to jumplist
2024-06-25 03:13:53 +00:00
Christian Clason
bbdbb7593f fix: adapt to Nvim deprecations in 0.10 (#3109) 2024-05-17 14:39:12 +02:00
James Trew
3b8399c273 fix: expand/normalize paths more selectively (#2628) 2024-03-19 22:55:27 +00:00
James Trew
12e42a3625 fix(current_buffer_fuzzy_find): error on select (#2942)
Previous implementation of placing the cursor on the first column of the
highlight failed to take into account that the highlighter can return
more than one data structure.
2024-02-24 01:08:59 +00:00
Anton Kastritskii
45d61cc8da fix(builtin.current_buffer_fuzzy_find): manually go through highlighted chars to pick smallest one (#2922) 2024-02-15 13:54:21 +00:00
Anton Kastritskii
fac5da839e feat(builtin.current_buffer_fuzzy_find): jump to first matched char (#2909)
* feat(builtin.current_buffer_fuzzy_find): jump to first matched char

* use highlighter to detect column to jump to

* replace default select

* handle non 0 based column index

* handle no highlight scenario

---------

Co-authored-by: James Trew <j.trew10@gmail.com>
2024-02-15 02:01:13 +00:00
Marco De Donno
236083884c fix: do not alter jumplist when jumping to a line in a file (#2910) 2024-02-04 21:37:33 +00:00
Sebastian Lyng Johansen
b4befa1c2f fix: fallback to filetype for get_lang for treesitter highlighting (#2867) 2024-01-18 11:43:26 +01:00
taeruh
03681adde1 fix(builin.grepstring): use 'normal!' instead of 'normal' (#2852) 2024-01-09 09:39:44 +01:00
Dmitriy Kovalenko
0bf09d05ab feat: Support Line Column in file pickers (#2791)
This implements a experimental interface for allowing prompts like this `file.txt:3:4`. It is already enabled on default for `find_files` and `git_files`.

Be wary of breaking changes for the interface if you plan to manually enable it.
2024-01-09 09:35:26 +01:00
James Trew
ffe90fac32 feat(current_buffer_fuzzy_find): results_ts_highlight option (#2722)
* feat(current_buffer_fuzzy_find): `results_ts_highlight` option

adds new option to the `current_buffer_fuzzy_find` picker
`results_ts_highlight` to enable/disable treesitter highlight for result
entries (default: true)

closes #2720

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

---------

Co-authored-by: Github Actions <actions@github>
2023-09-29 01:42:03 +00:00
cristiansofronie
2c1ed33a6f fix(files.current_buffer_fuzzy_find): fix nil indexing on enter if nothing is selected (#2678) 2023-08-30 17:33:30 +00:00
James Trew
96da5716e4 add missing dependency warning for ripgrep (#2639)
For live_grep and grep_string pickers.
2023-08-07 17:05:21 +00:00
James Trew
5a3fb8a012 Revert "add missing dependency warning for ripgrep (#2623)" (#2638)
This reverts commit 49a03aa844.
2023-08-06 21:07:24 +00:00
James Trew
49a03aa844 add missing dependency warning for ripgrep (#2623)
For live_grep and grep_string pickers.
2023-08-06 20:51:08 +00:00
James Trew
d2e17ba18a Revert "Fix tagrelative option not considered in builtin.tags (#2583)" (#2629)
This reverts commit 6074847b6e due to
performance regression.
2023-08-01 00:22:53 +00:00
James Trew
7bb2fcecdc Revert "expand paths more smartly (#2599)" (#2615)
This reverts commit f52ea4061d.
2023-07-21 21:50:44 -04:00
James Trew
f52ea4061d expand paths more smartly (#2599) 2023-07-21 22:12:29 +00:00
Oscar
6074847b6e Fix tagrelative option not considered in builtin.tags (#2583)
* Fix tagrelative option not considered in builtin.tags

* Fix wrong notify name

* ctags filtering with grep or rg and normalize path

* pass stylua check

---------

Co-authored-by: James Trew <j.trew10@gmail.com>
2023-06-25 19:16:15 +00:00
James Trew
ffe35cb433 fix(live_grep/grep_string): support non-utf8 patterns (#2570) 2023-06-21 21:25:35 +00:00
Christian Clason
d8c5ed4e40 feat(ts)!: use upstream treesitter implementation (#2499)
bumps minimum required neovim version to 0.9, see `help telescope.changelog-2499`
2023-05-24 10:43:04 +02:00
Safdar Awan
359e9ffc74 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
2023-04-09 10:07:14 +02:00
Maksym Klishevych
942fe5faef feat(treesitter): symbols & ignore symbols options (#2338)
* feat(treesitter): symbols & ignore symbols options

* renamed the function passed to utils.filter_symbols

---------

Co-authored-by: Maksym Klishevych <max@klishevy.ch>
2023-03-22 09:49:55 -04:00
Simon Hauser
a486ac3e8f fix: current_buffer_fuzzy_find highlighter (#2394) 2023-02-20 22:43:15 +01:00
cristiansofronie
f40e3e2304 feat: support selection for grep_string (#2333) 2023-02-19 13:41:28 +01:00
Simon Hauser
443e5a6802 fix: current_buffer_fuzzy_find push cursor (#2393)
close #2332
2023-02-19 12:24:40 +01:00
Simon Hauser
18fc02b499 fix: live_grep additional_args parsing (#2306) 2023-01-06 13:23:39 +01:00
Simon Hauser
0a7588252a chore: bump ci to more modern os and nvim versions (#2289) 2022-12-28 13:11:00 +01:00
fcying
d16581ef7d fix: misidentification invert and files_with_matches (#2240) (#2262) 2022-12-21 08:54:23 +01:00
Simon Hauser
9cf465894a fix: rg invert and files-with-matches res line parsing (#2208) 2022-10-25 21:22:17 +02:00
Gutyina Gergő
5c7db4055d feat: allow table as additional args in live grep and grep string (#2139) 2022-10-24 08:44:13 +02:00
kylo252
090b687542 perf(builtin): faster list extend for find_files (#2205) 2022-10-24 08:24:10 +02:00
Christian Clason
b923665e64 fix(preview): update buffer previewer to upstream changes (#2150)
https://github.com/neovim/neovim/pull/19931 removed `_get_hl_from_capture(id)` since captures are now implicitly mapped to highlight groups with the same name.
2022-08-27 15:29:36 +02:00
Bryce Montano
ad32a4c453 fix: find_files to force color=never (#2130)
Co-authored-by: Bryce Montano <brycesec@amazon.com>
2022-08-13 11:03:34 +02:00
TJ DeVries
4725867ec6 fix: restore testing framework to actually work (#2070)
after refactor to some new asynchronous items for finders,
the tests stopped actually doing anything.

now they do things again.
2022-08-04 16:00:30 -04:00
Simon Hauser
a36500c7ee fix: live_grep search_dirs and grep_open_files opts
fix #2048
2022-07-07 19:16:13 +02:00
Simon Hauser
f838695459 chore: reformat with stylua 0.14.0 2022-07-07 08:27:46 +02:00
Simon Hauser
30f2a367f2 feat(grep_string): invert_match for search="", removing empty lines (#2040) 2022-07-06 20:38:51 +02:00
Simon Hauser
02cf3e4070 feat: grep_open_files for builtin.grep_string (#2039) 2022-07-06 08:26:22 +02:00
Simon Hauser
2b1da47deb chore: make to_fuzzy_refine configurable (#2034) 2022-07-03 21:39:24 +02:00
Simon Hauser
0621c1c6ba break: prefix internal files and add deprecation messages (#2032) 2022-07-01 22:20:12 +02:00