octarect / telescope-menu.nvim

Picker for telescope.nvim to create custom menus.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to change layout config ?

hungnguyen1503 opened this issue · comments

Hi, I'd like to change the style of the popup menu in nvim, here is my configuration for menu but it doesn't work with my layout.

extensions = {
    menu = {
        Sessions = {
            items = {
                { "Load session", "SessionManager load_session" },
                { "Load last session", "SessionManager load_last_session" },
                { "Load current dir session", "SessionManager load_current_dir_session" },
                { "Save current session", "SessionManager save_current_session" },
                { "Delete session", "SessionManager delete_session" },
            },
            layout_config = {
                horizontal = {
                    width = 0.50,
                    height = 0.30,
                },
            },
        },
    }
}

Could you please support me to set up the layout config for this plugin?
Thank you.

@hungnguyen1503
The extension doesn't currently support layout_config in extension config.
I don't know if other extensions support it, but you may want to specify layout_config when you invoke the extension like the following;

require("telescope").extensions.menu.menu { layout_config = { width = 0.5, height = 0.3 } }

ref. https://github.com/nvim-telescope/telescope.nvim#layout-display