forked from zbirenbaum/copilot.lua
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
27 lines (23 loc) · 653 Bytes
/
init.lua
File metadata and controls
27 lines (23 loc) · 653 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
local M = {}
local defaults = {
plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer",
on_attach = function()
require("copilot_cmp")._on_insert_enter()
end,
startup_function = function()
vim.defer_fn(function()
require("copilot_cmp")._on_insert_enter()
end, 100)
end,
server_opts_overrides = {},
ft_disable = {},
}
local config_handler = function(opts)
local user_config = opts and vim.tbl_deep_extend("force", defaults, opts) or defaults
return user_config
end
M.setup = function(opts)
local user_config = config_handler(opts)
require("copilot.copilot_handler").start(user_config)
end
return M