octarect / telescope-menu.nvim

Picker for telescope.nvim to create custom menus.
MIT License
19 stars 1 forks source link

How to change layout config ? #3

Open hungnguyen1503 opened 1 year ago

hungnguyen1503 commented 1 year ago

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.

octarect commented 1 year ago

@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

hungnguyen1503 commented 1 year ago

Hi Boyd-san,

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

This config doesn't work too, I tried to use many ways to change the size, but it still doesn't work. I hope that layout_config will be supported in the future.

Best regards, Hung Nguyen

Vào Th 3, 21 thg 3, 2023 vào lúc 01:14 Boyd Kelly < @.***> đã viết:

Would be really nice to specify the height of the menu to visually match the contents.....

@hungnguyen1503 https://github.com/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

This doesn't seem to work. But would be awesome to specify at a very minimum the line height of the menu to visually match the contents. But fully support the layout_config would be even better !

— Reply to this email directly, view it on GitHub https://github.com/octarect/telescope-menu.nvim/issues/3#issuecomment-1476717754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBFE3GQKHG73AE3RZALMWTW5CNALANCNFSM6AAAAAARZA35UA . You are receiving this because you were mentioned.Message ID: @.***>