-
-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filename_first does not work if config key is present #3162
Comments
This is a lazy config issue. {
opts = { --[[ your opts]] },
config = function(_, opts)
-- this `opts` is the `opts` table from above
require('telescope').setup(opts)
end
} |
For the record. That wasn't the real issue. Turned out I had a key binding for a Telescope picker in my LSP config: -- plugins/lsp.lua
-- ...
config = function()
-- ...
vim.keymap.set(
'n',
'gd',
require('telescope.builtin').lsp_definitions,
{ desc = 'Goto Definition' }
)
end,
-- ... ^ This single piece of code was somehow messing up with the configuration, not sure if there was some sort of race condition, but just by moving it to the Telescope config fixed the problem. |
Description
Long story
A few weeks ago I came across the
filename_first
setting, I thought it was great. I added it to my Telescope config and it didn't work, I tried adding it in theopts
andconfig
keys, no luck.I just leave it there because it wasn't a blocker to do my job.
Today that I have some spare time I gave it a deeper look and I committed to figure it out why it wasn't working.
I decided to start with a minimal config and little by little replicate my own config.
I started with this minimal
opts
:And as soon as I added the
config
key I noticed thatWhen you add the
path_display = { filename_first = ... }
setting and theconfig
function (forlazy.nvim
), it doesn't work.Not sure if this is really the expected behavior but I think it shouldn't.
Neovim version
Operating system and version
macOS 14.5
Telescope version / branch / rev
0.1.x
checkhealth telescope
Steps to reproduce
nvim -nu minimal.lua
:Telescope find_files
config = function() end,
line:qa
thennvim -nu minimal.lua
:Telescope find_files
Expected behavior
It displays the filename first followed by the filepath whether the
config
key is present or not.Actual behavior
When the
config
key is present, thefilename_first
setting doesn't work.Minimal config
The text was updated successfully, but these errors were encountered: