Telescope Current Buffer Fuzzy Find is showing last result
Describe the bug
It is tricky to explain, but basically when I invoke Telescope fuzzy find in the current buffer (with default keymap <Leader>+/) and type in a search string, I am often shown only the last-scoring result. I then need to scroll up or down to see the other results, and importantly the best matches. Here is a screenshot of searching for "leader" inside the kickstart init.lua, just after I finish typing the search string:
To Reproduce
- Install neovim 0.10
- Get kickstart's
init.luaas config. - Open a file and invoke telescope current buffer fuzzy find with
<Leader>+/ - Search for a string.
Desktop
- OS: Pop!_OS 22.04 LTS x86_64
- Terminal: kitty 0.34.1
Neovim Version
NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
I could reproduce this, it's an issue in Telescope and is already fixed in the latest Telescope master branch, probably by this: https://github.com/nvim-telescope/telescope.nvim/pull/3109 fix: adapt to Nvim deprecations in 0.10
Change your Telescope plugin spec to use master branch instead, just remove the branch field:
diff --git a/init.lua b/init.lua
index 88658ef..c7f2be4 100644
--- a/init.lua
+++ b/init.lua
@@ -306,7 +306,7 @@ require('lazy').setup({
{ -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
event = 'VimEnter',
- branch = '0.1.x',
+ --branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
Removed the branch field, but then <leader>/ raises this error:
E5108: Error executing lua: ...ck/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:486: attempt to call field 'has_ts_parser' (a nil value)
stack traceback:
...ck/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:486: in function 'v'
...ck/lazy/telescope.nvim/lua/telescope/builtin/__files.lua:641: in function 'v'
...-kick/lazy/telescope.nvim/lua/telescope/builtin/init.lua:542: in function 'current_buffer_fuzzy_find'
When Lazy updated the Telescope plugin (after removing the branch field), it did print a changelog and mentioning "breaking changes" but I did not pay attention to the details. Maybe one of those changes is affecting now?
I don't know, the change works for me. Try running :Lazy and update (U) or sync (S) all the plugins.
Indeed, I think the Sync did it. Thank you very much :pray: