Commit Graph

386 Commits

Author SHA1 Message Date
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
Tyler Miller
eb88dc6434 feat(builtin.autocommands): support jumping to lua callback src (#2916) 2024-02-14 03:00:33 +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
Arne Van Maele
da8b3d4859 feat(builtin.oldfiles): support file location opening (#2863) 2024-01-12 03:53:31 +00:00
James Trew
b3ff5f3320 fix(builtin.oldfiles): cwd matching with special characters (#2860)
`vim.fn.matchstrpos({expr}, {pat})` doesn't handle all characters well
since the pattern (cwd path in this case) is used as a regex pattern.
2024-01-11 02:02:29 +00:00
James Trew
5550bbb1b6 fix(builtin.marks): normalize mark path (#2859) 2024-01-11 01:38:09 +00:00
JD
4367e05c06 fix(builtin)!: quickfix entry maker does not used fixed width for file (#2842) 2024-01-09 10:14:24 +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
8b56e9bb2d fix(builtin.buffers): better buffer in cwd check (#2847)
Previously, using `string.find`, certain characters were taken as regex
special characters leading to bad matches.
New approach takes bufname truncated to the length of cwd and compares
the two strings.
2024-01-04 03:18:39 +00:00
James Trew
c621f71012 fix(builtin.buffers): improve only_cwd handling with partial matches (#2845)
closes #2843

Previously, bad partial matches between cwd and target buffer path would
result in non-cwd buffers showing up in the picker despite using
`only_cwd=true`.

eg.
cwd = `/foo/bar`
target buffer = `foo/bar1/baz.txt`
The target buffer starts with the cwd path.

This is fixed by appending a path separator before comparing/matching:
eg.
cwd = `/foo/bar/`
target buffer = `foo/bar1/baz.txt`
2024-01-04 00:49:03 +00:00
James Trew
3466159b0f fix(builtin.colorscheme): get current colorscheme (#2837) 2023-12-29 01:18:41 +00:00
James Trew
aacaa9cd03 refactor(colorscheme): clean up vim.cmd colorscheme calls (#2830) 2023-12-27 01:50:20 +00:00
James Trew
c0ee29e8e4 refactor(git_status): clean up prompt retrieval for on_complete (#2829)
relevant #2825
2023-12-26 20:54:54 +00:00
James Trew
bccedaf88b fix(git_status): keep picker open with no matches (#2825)
Previously, `git_status` with a prompt that has zero matches closes the
picker.

Only automatically close the picker if working tree is completely clean.
If working tree is not clean, and a prompt is given but no matches are
found, keep the picker open. This behavior is consistent with other
pickers where lack of matches doesn't result in the picker closing.

closes #2815
2023-12-25 19:17:41 +00:00
James Trew
fa4d663c8c docs(git_status): add missing opt expand_dir (#2824)
* docs(git_status): add missing opt `expand_dir`

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

---------

Co-authored-by: Github Actions <actions@github>
2023-12-25 16:45:01 +00:00
Liu
9907deaed2 fix(builtin.commands): make 0-arg commands be repeatable by @: (#2808) 2023-12-24 19:25:02 +00:00
LUCIANO FURTADO
6213322ab5 feat(builtin.git_status): convert to async finder
Avoids timeout issues in large git repos.
2023-12-06 03:50:38 +00:00
Brian Mayo
3f5f165447 feat(buffers): add buffers_sort option (#2793)
* refactor: add sort_buffers option to buffers picker

* refactor: validate sort_buffers opt is a function
2023-12-03 21:24:07 +03:00
James Trew
721cdcae13 chore: fix marks picker options (#2783)
* chore: fix marks picker options

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

---------

Co-authored-by: Github Actions <actions@github>
2023-11-15 03:47:37 +00:00
LUCIANO FURTADO
4e77d1991d feat(marks): add support for displaying marks according to the mark_type (#2775)
* Fixes: #2763

* clean up docs type annotations

---------

Co-authored-by: LUCIANO FURTADO <l.furtado@f5.com>
Co-authored-by: James Trew <j.trew10@gmail.com>
2023-11-15 02:42:17 +00:00
Hicro
20bf20500c fix: nil problem when jump to location when tab drop is set as jump_type (#2760)
* feat(lsp_definitions): adding `tab drop` as `jump_type`

* feat(lsp-jump-types): `tab drop` for LSP features

Now, you're able to use `tab drop` as `jump_type` for these LSP
features: references, type definitions, definitions an implementations.

* fix(docs): reordering `tab drop` option

* feat: generate docs

* fix: nil problem with `vim.uri_to_fname`

* fix: removing warning about `file_uri` variable not being used

---------

Co-authored-by: Simon Hauser <simon.hauser@helsinki-systems.de>
2023-11-06 02:06:57 +00:00
Hicro
060fedfdea feat(lsp-jump-type): tab drop as new jump_type option for go-to LSP pickers (#2751) 2023-10-23 09:41:29 +02:00
AI
5a747a9587 fix(lsp): call hierarchy results processing (#2728) 2023-10-07 20:05:04 +00: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
Munif Tanjim
84d53dfdbe feat(pickers): fully customizable layout (#2572) 2023-09-27 08:34:22 +02:00
Charles Moscofian
40c8d2fc2b fix: only validate severity table when using a range (#2709)
The only possibility for having a table with different severities to
pass to `vim.diagnostics.get()` as opts is when setting a range (limit
and bound), so just check for an empty table when a range is set.
2023-09-19 23:55:48 +00:00
James Trew
e7cfbb5d1f fix(git): tbl_isarray compat with nvim 0.9 (#2710) 2023-09-19 23:43:18 +00:00
Sofronie Cristian
3d8e051c8c fix(internal.resume): dynamic_preview_title was not respected and title became static (#2696)
* fix(internal.resume): dynamic_preview_title was not respected and title became static

* run stylua
2023-09-09 23:33:01 +00:00
JINNOUCHI Yasushi
6b79d7a6a4 fix: use nil for the default diagnostics severity (#2662)
* fix: use nil for the default diagnostics severity

https://github.com/neovim/neovim/pull/24736 has introduced a new syntax
for severity format in `vim.diagnostic.get()`.

Fix #2661

* fix: fallback for 0.9.1

* fix: detect changes only when minor version > 9
2023-09-03 22:22:17 +00: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
blue pitaya
dc7f25c810 add 'full' for line_width in diagnostics options (#2452)
* add 'full' for line_width in diagnostics options

* lowercase documentation entry and change error notify method

* moved line_width options checking
2023-09-03 19:15:21 +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
f5363d3c2a feat(diagnostics): add sort_by option (#2632)
* feat(diagnostics): add `sort_by` option

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

---------

Co-authored-by: Github Actions <actions@github>
2023-08-06 20:46:34 +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
Aaron Kollasch
e7e6492a2d feat(git): Add bcommits_range picker (#2398)
* Filter bcommits by selection in visual mode

* Split bcommits_range into new picker

* Add option to run bcommits_range as operator

Starts operator-pending mode and shows commits in the range of lines
covered by the next text object or motion

* Rename range arguments to "first" and "last"

Can't use start/end, since end is an annoying keyword to use in lua
and start/stop doesn't fit as well

* Move operators functionality to new module

* Run bcommits if no range given to bcommits_range

* Make bcommits_range default to current line

Instead of calling bcommits

* Improve documentation of telescope.operators

* Add default value for last_operator

Default to a no-op callback

* Update bcommits_range for detached worktrees

See #2597

* Rename range arguments to "from" and "to"

* Move shared bcommits picker into single function
2023-07-22 21:35:52 +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
Andrii Berezhynskyi
597a3cc889 fix: do not ignore mappings from setup() when attach_mappings provided (#2613) 2023-07-21 09:28:26 -04:00
TJ DeVries
47c755d737 fix: handle non-file uris for lsp (#2604) 2023-07-17 13:20:09 -04:00
James Trew
2ea8dcd17b feat(git): support detached working trees (#2597)
* feat(git): support detached working trees

closes #2595

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

* fix: use_file_path

---------

Co-authored-by: Github Actions <actions@github>
2023-07-14 17:12:03 +00:00
Folke Lemaitre
276362a802 feat(lsp): added support for dynamic capabilities (#2594) 2023-07-06 18:30:43 -04:00
Stanislav Asunkin
0e0600908d fix: fix builtins lazy loading (#2590) 2023-07-02 21:51:55 +02: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
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