-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminimal-example.lua
49 lines (40 loc) · 1.48 KB
/
minimal-example.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
49
local vim = vim
local _get_config
local M = {}
-- function M:new(get_config)
-- print("get_config:", get_config)
-- print("minimal-example:new called with config: " .. vim.inspect(get_config()))
-- _get_config = get_config
-- return self
-- end
--
function M:new(get_config)
print("minimal-example:new called with config: " .. vim.inspect(get_config()))
_get_config = get_config
return self
end
-- start_servers should handle any commands that should be run, and track
-- processes so that stop_servers can kill them.
function M.start_servers(commands)
print("minimal-example:start_servers called with commands:\n".. vim.inspect(commands))
end
-- stop_servers should do any process cleanup necessary, and should kill any
-- running servers.
function M.stop_servers()
print("minimal-example:stop_servers called")
end
-- choose_process should launch a process picker that lets the user choose
-- which process to jump to. This picker can be anything. For example, the
-- native interface uses telescope, but the tmux interface uses tmux's
-- choose-tree.
function M.choose_process()
print("minimal-example:choose_process called")
end
-- is_available returns a boolean indicating whether the interface is available,
-- which tells butler whether or not to use this interface. A second return
-- value can be provided, which is a string that describes why the interface
-- is unavailable.
function M.is_available()
return false, "minimal-example interface is not implemented"
end
return M