nvim-telescope / telescope-ui-select.nvim

MIT License
774 stars 18 forks source link

Long messages in ui.select get truncated #31

Open crater2150 opened 9 months ago

crater2150 commented 9 months ago

Some LSPs create dialogs with a long or even multiline prompt passed to vim.ui.select, e.g. this message from metals (Scala LSP) (as it appears without telescope):

lsp-message

When using telescope as vim.ui.select implementation, this text is currently truncated, causing a prompt, where it is unclear what you are selecting:

lsp-message-telescope

As discussed on gitter, telescope's prompt_title is not designed to handle longer texts. One proposed solution was to create a wrapper function, which creates new window relative to the telescope prompt window's dimensions and put the long text there (which I haven't tried to write yet, as I don't have much experience with nvim scripting). Are there any other solutions, or would an implementation of the proposed one be merged? In the latter case, I may have time to look into it in a month or so.