Skip to content

[Feature]: expose and allow wrapping telescope_ui_select() #8

Open
@rebelot

Description

@rebelot

It would be great to have the opportunity to wrap https://github.com/nvim-telescope/telescope-ui-select.nvim/blob/master/lua/telescope/_extensions/ui-select.lua#L13 into a user-defined function, so that users can run arbitrary checks to infer who is the caller of vim.ui.select and set picker layout / theme / options accordingly.

eg:

vim.ui.select = function(items, opts, on_choice)
    if opts.kind and opts.kind == "codeaction" then
        tops = require'telescope.themes'.get_cursor()
    end
    require'telescope'.extensions.telescope_ui_select.telescope_ui_select(items, opts, on_choice, tops or {})
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions