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
31 lines (26 loc) · 859 Bytes
/
init.lua
File metadata and controls
31 lines (26 loc) · 859 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
local M = { setup_done = false }
local highlight = require("copilot.highlight")
local logger = require("copilot.logger")
local client = require("copilot.client")
local config = require("copilot.config")
M.setup = function(opts)
--if vim.fn.has("nvim-0.11") == 0 then
--vim.notify_once(
--"[copilot.lua] Neovim 0.11+ will soon be required. Please upgrade your Neovim version if you wish to keep using this plugin.",
--vim.log.levels.WARN
--)
--return
--end
if M.setup_done then
return
end
highlight.setup()
config.merge_with_user_configs(opts)
logger.setup(config.logger)
logger.debug("active plugin config:", config)
require("copilot.command").enable()
-- logged here to ensure the logger is setup
logger.debug("active LSP config (may change runtime):", client.config)
M.setup_done = true
end
return M