folke / noice.nvim

💥 Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu.
Apache License 2.0
4.18k stars 95 forks source link

"max_width" and "max_height" support percentage string #184

Closed adoyle-h closed 3 weeks ago

adoyle-h commented 1 year ago

The size of view:

size = {
    max_height = '50%',
    max_width = '50%',
    width = 'auto',
    height = 'auto',
}
max397574 commented 1 year ago

would perhaps make more sense to use a float number

adoyle-h commented 1 year ago

noice uses nui to show popups. The nui supports number or percentage string or table for size.

folke commented 1 year ago

@adoyle-h the max_width and max_height options are added by Noice. Will see to upstream those and make it so we can have percentages as well

adoyle-h commented 1 year ago

@folke Noice calculate the width. size.width = minmax(size.min_width, size.max_width, dim.width) https://github.com/folke/noice.nvim/blob/d0eea152566c1f7e15eb297959e4efbd1420a11c/lua/noice/util/nui.lua#L198-L201

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

adoyle-h commented 2 months ago

Remove stale label

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 weeks ago

This issue was closed because it has been stalled for 7 days with no activity.