File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed
Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ require('copilot').setup({
8787 [" ." ] = false ,
8888 },
8989 copilot_node_command = ' node' , -- Node.js version must be > 18.x
90+ copilot_model = " " , -- Current LSP default is gpt-35-turbo, supports gpt-4o-copilot
9091 server_opts_overrides = {},
9192})
9293```
Original file line number Diff line number Diff line change @@ -234,6 +234,9 @@ local function prepare_client_config(overrides)
234234 end
235235 end ,
236236 handlers = handlers ,
237+ init_options = {
238+ copilotIntegrationId = " vscode-chat" ,
239+ },
237240 }, overrides )
238241end
239242
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ local default_config = {
4141 auth_provider_url = nil ,
4242 copilot_node_command = " node" ,
4343 server_opts_overrides = {},
44+ --- @type string | nil
45+ copilot_model = nil ,
4446}
4547
4648local mod = {
Original file line number Diff line number Diff line change @@ -203,13 +203,20 @@ function M.get_editor_configuration()
203203 filetypes = vim .tbl_deep_extend (" keep" , filetypes , internal_filetypes )
204204 end
205205
206+ local copilot_model = conf .copilot_model ~= " " and conf .copilot_model or " "
207+
206208 --- @type string[]
207209 local disabled_filetypes = vim .tbl_filter (function (ft )
208210 return filetypes [ft ] == false
209211 end , vim .tbl_keys (filetypes ))
210212 table.sort (disabled_filetypes )
211213
212214 return {
215+ github = {
216+ copilot = {
217+ selectedCompletionModel = copilot_model ,
218+ },
219+ },
213220 enableAutoCompletions = not not (conf .panel .enabled or conf .suggestion .enabled ),
214221 disabledLanguages = vim .tbl_map (function (ft )
215222 return { languageId = ft }
You can’t perform that action at this time.
0 commit comments