A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/MunifTanjim/nui.nvim/wiki/nui.layout below:

nui.layout · MunifTanjim/nui.nvim Wiki · GitHub

local popups = {
  a = Popup({ border = "single", enter = true }),
  b = Popup({ border = "single" }),
}

local layout = Layout(
  {
    relative = "editor",
    position = "50%",
    size = { height = 10, width = 60 },
  },
  Layout.Box({
    Layout.Box(popups.a, { grow = 1 }),
    Layout.Box(popups.b, { grow = 1 }),
  }, { dir = "row" })
)

for _, popup in pairs(popups) do
  popup:on("BufLeave", function()
    vim.schedule(function()
      local curr_bufnr = vim.api.nvim_get_current_buf()
      for _, p in pairs(popups) do
        if p.bufnr == curr_bufnr then
          return
        end
      end
      layout:unmount()
    end)
  end)
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4