]> git.r.bdr.sh - rbdr/oleoboard.nvim/blob - lua/oleoboard/util.lua
fa7deac8608e3909a899eb5b4697e20af3019e94
[rbdr/oleoboard.nvim] / lua / oleoboard / util.lua
1 -------------------------------------------------------------------------------
2 -- Utilities shared by all modules. Categorize better if > 5 public functions
3 -------------------------------------------------------------------------------
4 local Util = {}
5
6 -------------------------------------------------------------------------------
7 -- Public Interface
8 -------------------------------------------------------------------------------
9 -- Window positioning utils
10 function Util.is_left_of(a, b)
11 return a[1] == b[1] and a[2] > b[2]
12 end
13
14 function Util.is_right_of(a, b)
15 return Util.is_left_of(b, a)
16 end
17
18 return Util