stevearc / dressing.nvim

Neovim plugin to improve the default vim.ui interfaces
MIT License
1.82k stars 32 forks source link

Telescope doesn't show all items in selection menu #56

Closed nimaipatel closed 2 years ago

nimaipatel commented 2 years ago

Describe the bug The telescope front-end seems to omit one entry from the selection menu every time.

System information

 require('dressing').setup {
    input = {
        winblend = 0,
    },
}

Example

vim.ui.select({'Hello', 'World'}, {}, function () end)

Screenshots image

stevearc commented 2 years ago

I don't think it's omitting the entry, I think it's underneath the border characters of the input window. Your telescope UI looks different from mine; have you passed in any custom config for it?

Screenshot from 2022-08-22 21-45-21

It could be adversely interacting with the default config passed in by dressing (which is just the dropdown theme). You can use the default telescope picker with:

require('dressing').setup({
  select = {
    telescope = {}
  }
})
nimaipatel commented 2 years ago

Thanks for the quick comment. I tried disabling a bunch of plugins but still not sure what is causing the weird telescope theme. Your solution works but it still doesn't seem to disable it which makes me think its just the default in latest telescope release, (although I might be wrong). image

The reason I raised the issue over here is because I don't seem to face the problem with telescope's inbuilt pickers. For example, here is find_files: image

stevearc commented 2 years ago

Weird, yeah it definitely looks like an incorrect telescope config. I pulled the latest master before I tested and didn't see this, so I suspect it's some rogue plugin or config snippet that's modifying the telescope options. Can you try on a clean install with just telescope and see if the windows still look like this?

You could also try adding a print(debug.traceback()) inside of the telescope.setup function to see where it's getting called from, and verify that the config is what you expect.

nimaipatel commented 2 years ago

You are right, after some debugging I realized this is because of a global setting I had for floating windows. Thanks and sorry for wasting your time.