Open danielo515 opened 1 year ago
It looks like the very same bug applied to 'truncate' behavior.
I can't reproduce either of this.
I'm also fairly confident that there is no bug here. The transforming for the path using path_display
option has no baring on the ordinal value used to do the filtering.
I would need a proper minimal config and reproduction steps (describe creating the files to search, etc) to convince me otherwise.
@jamestrew my STR are:
path_display
to truncate
telescope_zf
pluginfind_files
picker and search for something containing space(a valid delimiter for zf
to narrow the search results)That isn't really an adequate minimal config or instructions..,
Here's the min config I tried
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.loop.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",
"natecraddock/telescope-zf-native.nvim",
},
config = function()
require("telescope").setup({
defaults = {
path_display = { "truncate" },
},
})
require("telescope").load_extension("zf-native")
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
If you'd like me to volunteer my free time to this, you would need to provide some evidence that this bug actually exists by demonstrating that it's actually reproduce-able using a minimal config like above, with clear instructions.
I appreciate your generous contribution of time and effort, @jamestrew. Your minimal configuration seems to be correct. However, the crucial element of my reproduction relies on the utilization of the find_files
picker. It works as intended until the truncate
policy is applied to the search results. Specifically, in most of my tests, this problem occurs when the search query includes the space operator, which acts as a narrowing delimiter for zf
.
Yeah that's what I'm trying but I can't reproduce it. Unless I'm misinterpreting something...
@jamestrew thank you. Unfortunately, I cannot share the exact file paths, but there are screenshots that illustrate that behavior.
I hope it helps 😬
Description
When you use
path_display = { "smart" }
for any picker, specially grep, it is not possible to filter the results using the path. Other methods (truncate, absolute, etc) seem to work just fineNeovim version
Operating system and version
macOS 13.1
Telescope version / branch / rev
0b1c41a
checkhealth telescope
Steps to reproduce
path_display = { "smart" }
Expected behavior
Being able to filter based both on path and result text. For example
Actual behavior
path_display = { "smart" }
does not allow to filter by path, only by result textMinimal config