-
-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathslide.lua
48 lines (47 loc) · 1.08 KB
/
slide.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
local stages_util = require("notify.stages.util")
return function(direction)
return {
function(state)
local next_height = state.message.height + 2
local next_row = stages_util.available_slot(state.open_windows, next_height, direction)
if not next_row then
return nil
end
return {
relative = "editor",
anchor = "NE",
width = 1,
height = state.message.height,
col = vim.opt.columns:get(),
row = next_row,
border = "rounded",
style = "minimal",
}
end,
function(state)
return {
width = { state.message.width, frequency = 2 },
col = { vim.opt.columns:get() },
}
end,
function()
return {
col = { vim.opt.columns:get() },
time = true,
}
end,
function()
return {
width = {
1,
frequency = 2.5,
damping = 0.9,
complete = function(cur_width)
return cur_width < 2
end,
},
col = { vim.opt.columns:get() },
}
end,
}
end