forked from zbirenbaum/copilot.lua
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.lua
More file actions
46 lines (36 loc) · 1.12 KB
/
api.lua
File metadata and controls
46 lines (36 loc) · 1.12 KB
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
-- Abstraction to the copilot-lsp module
local M = {}
function M.nes_set_auto_trigger(value)
local config = require("copilot-lsp.config")
config.config.require("copilot-lsp.nes").auto_trigger = value
end
function M.nes_lsp_on_init(client, au)
require("copilot-lsp.nes").lsp_on_init(client, au)
end
function M.set_hl()
local util = require("copilot-lsp.util")
util.set_hl()
end
---@param bufnr? integer
---@return boolean --if the cursor walked
function M.nes_walk_cursor_start_edit(bufnr)
return require("copilot-lsp.nes").walk_cursor_start_edit(bufnr)
end
---@param bufnr? integer
---@return boolean --if the cursor walked
function M.nes_walk_cursor_end_edit(bufnr)
return require("copilot-lsp.nes").walk_cursor_end_edit(bufnr)
end
---@param bufnr? integer
---@return boolean --if the nes was applied
function M.nes_apply_pending_nes(bufnr)
return require("copilot-lsp.nes").apply_pending_nes(bufnr)
end
---@return boolean -- true if a suggestion was cleared, false if no suggestion existed
function M.nes_clear()
return require("copilot-lsp.nes").clear()
end
function M.test()
require("copilot-lsp.nes")
end
return M