Skip to content

Set a ratio for width and height of floating window #2195

@johnsonhong997

Description

@johnsonhong997

I want the configuration to allows user to set ratio for width and height of floating window.

Refer to the telescope.nvim plugin, which allows the user to set a ratio for width and height of the window and update the width and height when the terminal resizes.

require("nvim-tree").setup({
  view = {
    float = {
      enable = true,
      quit_on_focus_loss = true,
      open_win_config = {
	width = 30,  -- set a ratio such as 0.5 or 0.8
	height = 30, -- now only numbers larger than 1 are allowed
      },
    },
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR pleasenvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciatedfeature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions