1257 Commits

Author SHA1 Message Date
Tristan Knight
a0bbec2114 fix(builtin.spell_suggest): ciw into black hole register (#3124)
(cherry picked from commit 5665d93988)
0.1.8
2024-05-24 08:42:27 +02:00
Folke Lemaitre
08a28108c2 feat(lsp): added support for dynamic capabilities (#2594)
(cherry picked from commit 276362a802)
2024-05-22 22:58:28 +02:00
Simon Hauser
d829aa6405 chore: add neovim v0.10.0 to ci matrix (#3121)
(cherry picked from commit 4aed63995a)
0.1.7
2024-05-20 11:56:18 +02:00
Christian Clason
6f32711d76 fixup: adapt to deprecations in Nvim 0.10 (#3113)
vim.iter.flatten() is not a full replacement (does not support arrays
with `nil`); a fix may be backported but for now only use it on nightly
(0.10 has no warnings yet).

(cherry picked from commit 0c12735d5a)
2024-05-20 11:49:39 +02:00
Christian Clason
a3a7f4c6b9 fixup: adapt to deprecations in Nvim 0.10 (#3112)
(cherry picked from commit 33f04c3a86)
2024-05-20 11:49:25 +02:00
Christian Clason
dd4acbd6fa fix: adapt to Nvim deprecations in 0.10 (#3109)
(cherry picked from commit bbdbb7593f)
2024-05-20 11:48:33 +02:00
DevFortunato
3a5d17d9d0 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>
(cherry picked from commit 96610122a4)
2024-05-20 11:43:12 +02:00
James Trew
2e5f7ae754 fix(builtin.buffers): previews with specified cwd option (#3111)
Currently, the buffer name is normalized to the `cwd` option value.
This buffer name is then used as the filename, which is used as the file
path for the previewer. But if the `cwd` value is not the actual cwd,
the buffer path can no longer be found by the previewer (relative to the
true cwd).

This is fixed by adding a `path` value to the entry that's the full path
of the buffer. The previewer will then use this full path to find the
file to preview.

(cherry picked from commit ccaeeb5af5)
2024-05-20 11:40:50 +02:00
James Trew
9194becd77 fix(picker): set current_line state earlier (#3052)
Sets the `current_line` global state earlier in the event loop rather
than in `get_results_completor`. This makes it safer to access
`current_line` earlier (eg. for building an entry).

(cherry picked from commit 52f500110b)
2024-05-20 11:39:48 +02:00
Kira Kawai
cf3ce11a5d fix(checkhealth): windows binary existence check (#3093)
* 🐛 Windows: allow binary without extension

* show `(unknown version)` if parse failed

Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>

---------

Co-authored-by: ras0q <ras0q@users.noreply.github.com>
Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>
(cherry picked from commit 29fddf76bc)
2024-05-20 11:37:44 +02:00
Christoph Bier
ac05f165e9 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)

(cherry picked from commit 02a60a8396)
2024-05-20 11:36:12 +02:00
James Trew
588e26ff9f fix(previewer): improve binary mime type check (#3083)
* fix(previewer): improve binary mime type check

Problem: mime type for a ts/js file can either return `text/plain` or
`application/javascript` based on the contents of the file.
Previously, this meant `application/javascript` would be considered
"possibly binary". This, in conjunction with how `vim.filetype.match`
does not give a result for a filename that ends in `.ts`, would lead to
a typescript file taking the path of `check_mime_type` and eventually
`mime_hook`.

Solution: Include `application/javascript` as a non-binary file type
during mime type check.

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

---------

Co-authored-by: Github Actions <actions@github>
(cherry picked from commit fac83a556e)
2024-05-20 11:34:02 +02:00
Nolan Prochnau
679dacb6f4 fix(builtin.commands): don't remap for feedkeys (#3087)
(cherry picked from commit 486a6489c4)
2024-05-20 11:30:49 +02:00
Kevin Traver
c4e3e8f6ca fix(picker): notify on empty quickfix and loclist (#3082)
(cherry picked from commit 2d0d057791)
2024-05-20 11:30:40 +02:00
AoMe · 青目
01928ddecc fix(buffer_previewer): no preview showing when set nomodifiable (#3077)
Not showing a preview with the new changes in the latest changes of
[plenary.nvim PR
#575](https://github.com/nvim-lua/plenary.nvim/pull/575).

The error occurs when changing from `nomodifiable` to `modifiable`.
Telescope itself works, but the previews don't render.

(cherry picked from commit 1084d07cf4)
2024-05-20 11:29:39 +02:00
James Trew
021a358db9 fix(which_key): close window on mouse click action (#3053)
* fix(which_key): close window on mouse click action

`nvim_buf_delete` is not allowed during text change or window change.
Window switching with left mouse click was leading to race
condition/error.

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

---------

Co-authored-by: Github Actions <actions@github>
(cherry picked from commit d00d9df48c)
2024-05-20 11:28:38 +02:00
Mohamad Sulton Hasanuddin
93bd73e646 fix(which_key): increase zindex for popup window (#3046)
(cherry picked from commit a3284957d3)
2024-05-20 11:28:12 +02:00
James Trew
7ea9ae5118 build: rework ci tests to include windows (#3011)
(cherry picked from commit 4d4ade7f2b)
2024-05-20 11:18:23 +02:00
James Trew
b9ea3a2d5f fix(actions): set function name for generate.which_key (#3044)
Using anonymous function is throwing warning "No name available for
anonymous functions" when `action_generate.which_key` is used as shown
in the docs.

(cherry picked from commit 5a701e9990)
2024-05-20 11:14:19 +02:00
gzbfgjf2
9ab6aa2a7c fix(marks): preserve uri filenames with path_expand (#3029)
(cherry picked from commit d26b666b45)
2024-05-20 11:13:59 +02:00
James Trew
f9722f7ee4 test(utils): add unit test for transform_path (#3013)
(cherry picked from commit b22e6f6896)
2024-05-20 11:13:12 +02:00
Edwin Tang
097a64a166 fix(previewer): preview message out of bounds (#3003)
* fix(set_preview_message): check line height of previewer before setting message.

* style: run changed file through stylua and remove unused variable.

* refactor: change lines table instead. check max between line_pos and 0

* style: run changed file through stylua.

(cherry picked from commit c2b8311dfa)
2024-05-20 11:11:57 +02:00
James Trew
d7d32a3850 fix(utils.path_expand): improve windows support (#2999)
In order to maintain plenary compatibility (for now, and slightly for
other edgecase reasons), avoid converting backslashes to forward
slashes.

(cherry picked from commit 1e59188575)
2024-05-20 11:11:14 +02:00
James Trew
ce398bcdc8 fix(previewer): don't escape paths for fs_stat (#2996)
`vim.loop.fs_stat` takes file paths literally so no escaping special
characters are need (eg spaces, `$`, etc)

(cherry picked from commit 221778e93b)
2024-05-20 11:10:16 +02:00
James Trew
d5fe96ec8a fix: expand/normalize paths more selectively (#2628)
(cherry picked from commit 3b8399c273)
2024-05-20 11:10:12 +02:00
James Trew
48960a8164 fix(builtin.lsp): bad check for jump_type option (#2991)
(cherry picked from commit c816406bd5)
2024-05-20 10:55:29 +02:00
James Trew
6d61c905ee fix(builtin.lsp): extra No Name buffer opening with jump_type (#2990)
(cherry picked from commit 5730b950d9)
2024-05-20 10:54:30 +02:00
James Trew
332465c706 docs(builtin.colorscheme): add colors option desc (#2989)
* docs(builtin.colorscheme): add `colors` option desc

* docgen plz

(cherry picked from commit 1fa3b801f0)
2024-05-20 10:52:19 +02:00
James Trew
391581dd26 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.

(cherry picked from commit 8cd58c6e81)
2024-05-20 10:52:13 +02:00
fcying
321d782c1d fix: remove duplicate lazyloaded items in colorscheme (#2951)
(cherry picked from commit 04dfe370b0)
2024-05-20 10:52:06 +02:00
0x7a7a
d747440d64 fix: select correct results row with sorting_strategy=ascending (#2986)
(cherry picked from commit e9e01d6998)
2024-05-20 10:51:46 +02:00
Miguel Ángel
5b3b79b3a4 docs(readme): clean up command example (#2984)
(cherry picked from commit 67c598fdd4)
2024-05-20 10:51:15 +02:00
James Trew
6312868392 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>
(cherry picked from commit fa4d663c8c)
0.1.6
2024-03-12 15:16:42 +01:00
James Trew
d85ad68222 fix(builtin.marks): expand mark path (#2980)
(cherry picked from commit 5550bbb1b6)
2024-03-12 14:24:34 +01:00
James Trew
93dc724f38 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

(cherry picked from commit 955e50dfed)
2024-03-06 16:05:54 +01:00
Pedro Ferrari
ec3474b596 fix(git_branch): previewer commit hash dynamic highlighting (#2921)
* Fix highlight of commit hash in git branches preview

* Update lua/telescope/previewers/buffer_previewer.lua

Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>

---------

Co-authored-by: James Trew <66286082+jamestrew@users.noreply.github.com>
(cherry picked from commit b744cf5975)
2024-03-06 15:55:11 +01:00
Marco De Donno
6d2be79385 fix: do not alter jumplist when jumping to a line in a file (#2910)
(cherry picked from commit 236083884c)
2024-03-06 11:12:43 +01:00
ALX99
fd333cd8b6 docs(developers): fix incorrect file paths (#2902)
(cherry picked from commit 7b5c5f56a2)
2024-03-06 11:11:13 +01:00
rjooske
199ce5fc25 fix(previewer): buffer previews for term not initially scrolled (#2899)
(cherry picked from commit e54fbf4ab2)
2024-03-06 11:10:50 +01:00
Kobu
6ee97f1f8b doc(action_state): improve description of action_state.get_current_line (#2895)
(cherry picked from commit f1fd99ebfb)
2024-03-06 11:08:56 +01:00
atusy
9594a7eb46 fix(previewer): buffer_previewer_maker now receives all necessary opts everywhere (#2833)
(cherry picked from commit 301505da4b)
2024-03-06 11:08:23 +01:00
James Trew
626a61b595 docs(contrib): update contribution guide (#2879)
(cherry picked from commit 20efb38649)
2024-03-06 11:07:40 +01:00
James Trew
5150bc2693 fix(git_status): support path_display (#2881)
(cherry picked from commit 0902bb39eb)
2024-03-06 11:07:18 +01:00
James Trew
38d0c5fef2 docs: update CONTRIBUTING.md (#2876)
(cherry picked from commit 43cabe5327)
2024-03-06 11:04:55 +01:00
James Trew
72b42a5b80 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.

(cherry picked from commit b3ff5f3320)
2024-03-06 11:03:57 +01:00
James Trew
65ee034c35 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.

(cherry picked from commit 8b56e9bb2d)
2024-03-06 10:46:02 +01:00
James Trew
425ab66b3b 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`

(cherry picked from commit c621f71012)
2024-03-06 10:44:30 +01:00
James Trew
42bbf5a481 fix(builtin.keymaps): escape newline chars in desc (#2832)
closes #2827

(cherry picked from commit e0651458f2)
2024-03-06 10:40:52 +01:00
Sean Mackesey
abd9a6f451 fix(which_key): always close on telescope prompt exit
* Add autocmd to make `which_key` window close on prompt exit

Currently `actions.which_key` supports a `close_with_action` option
(default true). When this is set, the `which_key` window will close
after any Telescope action is triggered. This makes sense. However, when
it is false, the `which_key` window remains open even after Telescope
closes. This seems like a bug.

This PR fixes this by setting an autocommand when `close_with_action` is
false to close on prompt exit.

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

* Add autocmd to make `which_key` window close on prompt exit

Currently `actions.which_key` supports a `close_with_action` option
(default true). When this is set, the `which_key` window will close
after any Telescope action is triggered. This makes sense. However, when
it is false, the `which_key` window remains open even after Telescope
closes. This seems like a bug.

This PR fixes this by setting an autocommand when `close_with_action` is
false to close on prompt exit.

---------

Co-authored-by: Github Actions <actions@github>
(cherry picked from commit ae6708a90b)
2024-03-06 10:38:50 +01:00
Liu
1bec1c974e fix(builtin.commands): make 0-arg commands be repeatable by @: (#2808)
(cherry picked from commit 9907deaed2)
2024-03-06 10:36:06 +01:00