telescope.nvim
telescope.nvim copied to clipboard
Builtin buffer picker highlights flags column when searching
Description
When searching for a symbol that appears both in flags column and filename, highlight applies to the former. Appears to be because it finds this symbol first.
At first I thought that flags are searchable (and I would love that) but after some investigation found out this bug
Neovim version
NVIM v0.10.1
Build type: RelWithDebInfo
LuaJIT 2.1.1720049189
Operating system and version
fedora 40 (under WSL)
Telescope version / branch / rev
3b1600d
checkhealth telescope
──────────────────────────────────────────────────────────────────────────────
telescope: require("telescope.health").check()
Checking for required plugins
- OK plenary installed.
- WARNING nvim-treesitter not found. (Required for `:Telescope treesitter`.)
Checking external dependencies
- OK rg: found ripgrep 14.1.0
- WARNING fd: not found. Install [sharkdp/fd](https://github.com/sharkdp/fd) for extended capabilities
===== Installed extensions =====
Steps to reproduce
- create multiple files with "h" in the name
- inside neovim open the files so that they become hidden buffers
- open buffers picker with
:lua require("telescope.builtin").buffers()
- try to search for a string that starts with "h"
Expected behavior
Highlight applies to filename only like that:
Actual behavior
Here I have some hidden buffers:
When I type "h" that is present in file names:
Weirdly when typing more behavior differs between entries:
Minimal config
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
}
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
require("telescope").setup {}
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})