File tree 4 files changed +13
-0
lines changed
4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ require('copilot').setup({
87
87
[" ." ] = false ,
88
88
},
89
89
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
90
91
server_opts_overrides = {},
91
92
})
92
93
```
Original file line number Diff line number Diff line change @@ -234,6 +234,9 @@ local function prepare_client_config(overrides)
234
234
end
235
235
end ,
236
236
handlers = handlers ,
237
+ init_options = {
238
+ copilotIntegrationId = " vscode-chat" ,
239
+ },
237
240
}, overrides )
238
241
end
239
242
Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ local default_config = {
41
41
auth_provider_url = nil ,
42
42
copilot_node_command = " node" ,
43
43
server_opts_overrides = {},
44
+ --- @type string | nil
45
+ copilot_model = nil ,
44
46
}
45
47
46
48
local mod = {
Original file line number Diff line number Diff line change @@ -203,13 +203,20 @@ function M.get_editor_configuration()
203
203
filetypes = vim .tbl_deep_extend (" keep" , filetypes , internal_filetypes )
204
204
end
205
205
206
+ local copilot_model = conf .copilot_model ~= " " and conf .copilot_model or " "
207
+
206
208
--- @type string[]
207
209
local disabled_filetypes = vim .tbl_filter (function (ft )
208
210
return filetypes [ft ] == false
209
211
end , vim .tbl_keys (filetypes ))
210
212
table.sort (disabled_filetypes )
211
213
212
214
return {
215
+ github = {
216
+ copilot = {
217
+ selectedCompletionModel = copilot_model ,
218
+ },
219
+ },
213
220
enableAutoCompletions = not not (conf .panel .enabled or conf .suggestion .enabled ),
214
221
disabledLanguages = vim .tbl_map (function (ft )
215
222
return { languageId = ft }
You can’t perform that action at this time.
0 commit comments