-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
50 lines (37 loc) · 788 Bytes
/
init.lua
File metadata and controls
50 lines (37 loc) · 788 Bytes
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
49
50
local M = {
current_terminal = nil
}
M.Wrapper = require("consolation/wrapper")
function M.set_current_terminal(term)
M.current_terminal = term
end
function M.setup(opts)
local term = M.Wrapper:new()
term:setup(opts)
M.set_current_terminal(term)
end
function M.create()
M.current_terminal:create()
end
function M.open(args)
M.current_terminal:open(args)
end
function M.close()
M.current_terminal:close()
end
function M.kill()
M.current_terminal:kill()
end
function M.is_open()
return M.current_terminal:is_open()
end
function M.get_winnr()
return M.current_terminal:get_winnr()
end
function M.toggle(args)
M.current_terminal:toggle(args)
end
function M.send_command(args)
M.current_terminal:send_command(args)
end
return M