Commit Graph

415 Commits

Author SHA1 Message Date
Yeri Pratama
7231b52276 fix(buffers): select_current not selecting current buffer index (#3147)
Co-authored-by: Yeri <yeri@accelbyte.net>
2024-06-09 14:09:00 +00:00
Lonzo_ghf
3a743491e5 fix(lsp.reference): only filter the current line of the current filname (#3154)
* fix(lsp.reference): Only filter the current line of the current filname

fix(lsp.reference): Only filter the current line of the current filname when include_current_line=false

* fix(lsp.reference): Only filter the current line of the current filname

* run stylua

---------

Co-authored-by: James Trew <j.trew10@gmail.com>
2024-06-08 02:32:45 +00:00
Lawrence Ho
dfa230be84 fix(lsp): handle URI in item_to_location (#3144) 2024-05-29 19:24:09 +02:00
James Trew
127159a52f fix(lsp.reference): single reference direct jump (#3137)
* fix(lsp.reference): single reference direct jump

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

---------

Co-authored-by: Github Actions <actions@github>
2024-05-29 01:34:22 +00:00
James Trew
4c96370cf9 fix(make_entry): improve filename_first support (#3140)
Few pickers with entry makers that relied on `entry_display.create` were
not properly passing the highlight table returned by `transform_path`.
This made the `filename_first` `path_display` option not work as
expected for these pickers.
2024-05-27 01:50:31 +00:00
xudyang1
349660c0d3 fix(pickers): improve CRLF line splitting support for windows (#3127)
* fix(help_tags): show help tags on windows (#3126)

On Windows, `builtin.help_tags` picker does not show any help tags.

To fix this, the following changes are needed:

1. `util.path_tail` checks unix separator `/` on Windows and leave the
original implementation intact on unix systems.

2. Line endings should be taken carefully on Windows. `vim.split` with
   only newline `\n` character as separator may result in unexpected
   crash when parsing large files. When splits on lines are needed, call
   it with `\r?\n`, or even set up a wrapper function in utils is more
   prefered.

Fixes #3126

* fix: handle cross platform line splits
2024-05-26 14:15:31 +00:00
Tristan Knight
5665d93988 fix(builtin.spell_suggest): ciw into black hole register (#3124) 2024-05-23 02:41:23 +00:00
Max Jendruk
05f4d6f0a9 feat(builtin.treesitter): add symbol_width opt (#3105)
* Add options to customize length of symbols and line numbers for gen_from_treesitter

* Revert adding symbol_type_width option

* Add docs and type hint
2024-05-23 01:50:14 +00:00
Christian Clason
33f04c3a86 fixup: adapt to deprecations in Nvim 0.10 (#3112) 2024-05-17 18:10:21 +02:00
Christian Clason
bbdbb7593f fix: adapt to Nvim deprecations in 0.10 (#3109) 2024-05-17 14:39:12 +02:00
DevFortunato
96610122a4 fix(builtin.colorscheme): preview colorscheme without previewer (#3097)
* fix: enable_preview true

* fix: remove buflisted check and colorscheme command in the buffer previewer

---------

Co-authored-by: nobrain <moviemaker@alfonso>
2024-05-17 03:08:28 +00:00
James Trew
6f6bb80655 Revert "refactor(lsp): simplify list_to_jump (#3099)" (#3101)
This reverts commit e9be6bb7a7.
2024-05-14 14:34:00 +00:00
James Trew
e9be6bb7a7 refactor(lsp): simplify list_to_jump (#3099)
* refactor(lsp): simplify `list_to_jump`

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

---------

Co-authored-by: Github Actions <actions@github>
2024-05-14 04:10:11 +00:00
James Trew
c8b69caae5 fix(lsp): add missing offset_encoding param (#3098) 2024-05-14 02:54:56 +00:00
Adrian Göransson
df4dd3089d fix(lsp.references): include_current_line option regression (#3091)
* Fix jump regression in LSP references action handler

This change restores the possibility to exclude the current line when
invoking the lsp_references picker.

- opts.include_current_line is by default unset, so the previous
  equality check would fail unless the option was set explicitly.
- vim.api.nvim_win_get_cursor() returns both line and column, so it
  can't be directly compared with the returned line number.
- The actual comparison was expecting quickfix-like items, when in
  actuality, we were dealing with raw LSP location objects.

* lsp: Pass offset_encoding to action_handlers

* LSP: Action handlers take both locations and items

* LSP: Rename (flattened_)results → locations

* LSP: Early return in list_or_jump
2024-05-14 02:27:57 +00:00
Christoph Bier
02a60a8396 fix(builtin.oldfiles): fix cwd_only for windows (#3096)
Remove backslash escaping in oldfiles picker, which was needed
before the code was changed to use substring comparison instead of
regex matching. (Commit b3ff5f33)
2024-05-12 18:30:53 +00:00
Nolan Prochnau
486a6489c4 fix(builtin.commands): don't remap for feedkeys (#3087) 2024-05-03 01:28:13 +00:00
Kevin Traver
2d0d057791 fix(picker): notify on empty quickfix and loclist (#3082) 2024-05-01 02:26:27 +00:00
gzbfgjf2
d26b666b45 fix(marks): preserve uri filenames with path_expand (#3029) 2024-04-05 01:03:48 +00:00
James Trew
3b8399c273 fix: expand/normalize paths more selectively (#2628) 2024-03-19 22:55:27 +00:00
James Trew
c816406bd5 fix(builtin.lsp): bad check for jump_type option (#2991) 2024-03-18 15:39:57 +00:00
James Trew
5730b950d9 fix(builtin.lsp): extra No Name buffer opening with jump_type (#2990) 2024-03-18 13:41:56 +00:00
James Trew
1fa3b801f0 docs(builtin.colorscheme): add colors option desc (#2989)
* docs(builtin.colorscheme): add `colors` option desc

* docgen plz
2024-03-18 02:05:26 +00:00
James Trew
8cd58c6e81 fix(lsp): incoming/outgoing_call range locations (#2985)
Previous implementation uses the incorrect lsp result fields for
generating call site locations resulting in incomplete and incorrect
results.
2024-03-18 01:09:56 +00:00
fcying
04dfe370b0 fix: remove duplicate lazyloaded items in colorscheme (#2951) 2024-03-18 00:28:10 +00:00
Damjan 9000
6868df51d2 feat(bultin.buffer): add select_current option (#2918) 2024-02-24 15:21:25 +01:00
James Trew
955e50dfed feat(git_files): support emoji/unicode in filenames (#2943)
Pass `core.quotepath=false` to achieve this.

Could alternatively pass `-z` but that uses `\0` line termination and
complicates things.

Closes #2900
2024-02-24 01:28:29 +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
James Trew
a5b69afa48 refactor(lsp): consolidate some picker jump logic (#2935) 2024-02-23 03:15:55 +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
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