robin/ivy

my custom neovim config

git clone https://git.robinwobin.dev/robin/ivy

robinrefactor: use `nvim_on`fe63ce7

main
491 B25 linesraw
1if vim.g.loaded_borderless then
2  return
3end
4
5vim.g.loaded_borderless = true
6
7local function reset()
8  io.stdout:write("\027]111\027\\")
9end
10
11local augroup = vim.augroup("@ivy.borderless", true)
12
13augroup({ "UIEnter", "ColorScheme" }, function()
14  local normal = vim.api.nvim_get_hl(0, { name = "Normal" })
15  if not (normal and normal.bg) then
16    reset()
17    return
18  end
19
20  io.stdout:write(string.format("\027]11;#%06x\027\\", normal.bg))
21end)
22
23augroup("UILeave", function()
24  reset()
25end)