File tree Expand file tree Collapse file tree 2 files changed +15
-27
lines changed
Expand file tree Collapse file tree 2 files changed +15
-27
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- local config = require (" copilot.config" )
21local M = {}
32
4- M .setup = function (params )
5- config .setup (params )
6- config .params .plugin_manager_path = vim .fn .expand (config .params .plugin_manager_path ) -- resolve wildcard and variable containing paths
7- require (" copilot.copilot_handler" ).start (config .params )
3+ local defaults = {
4+ plugin_manager_path = vim .fn .stdpath (" data" ) .. " /site/pack/packer" ,
5+ on_attach = function ()
6+ require (" copilot_cmp" )._on_insert_enter ()
7+ end ,
8+ }
9+
10+ local config_handler = function (opts )
11+ local user_config = opts and vim .tbl_deep_extend (" force" , defaults , opts ) or defaults
12+ return user_config
13+ end
14+
15+ M .setup = function (opts )
16+ local user_config = config_handler (opts )
17+ require (" copilot.copilot_handler" ).start (user_config )
818end
919
1020return M
You can’t perform that action at this time.
0 commit comments