You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ require('copilot').setup({
110
110
trace_lsp_progress=false,
111
111
log_lsp_messages=false,
112
112
},
113
-
copilot_node_command='node', -- Node.js version must be > 18.x
113
+
copilot_node_command='node', -- Node.js version must be > 20
114
114
workspace_folders= {},
115
115
copilot_model="", -- Current LSP default is gpt-35-turbo, supports gpt-4o-copilot
116
116
root_dir=function()
@@ -129,7 +129,10 @@ require('copilot').setup({
129
129
130
130
returntrue
131
131
end,
132
-
lsp_binary=nil,
132
+
server= {
133
+
type="nodejs", -- "nodejs" | "binary"
134
+
custom_server_filepath=nil,
135
+
},
133
136
server_opts_overrides= {},
134
137
})
135
138
```
@@ -280,6 +283,16 @@ When `log_lsp_messages` is true, LSP log messages (`window/logMessage`) events w
280
283
281
284
Careful turning on all logging features as the log files may get very large over time, and are not pruned by the application.
282
285
286
+
### copilot_node_command
287
+
288
+
Use this field to provide the path to a specific node version such as one installed by nvm. Node.js version must be 20 or newer.
289
+
290
+
Example:
291
+
292
+
```lua
293
+
copilot_node_command=vim.fn.expand("$HOME") .."/.config/nvm/versions/node/v20.0.1/bin/node", -- Node.js version must be > 20
294
+
```
295
+
283
296
### server_opts_overrides
284
297
285
298
Override copilot lsp client settings. The `settings` field is where you can set the values of the options defined in [SettingsOpts.md](./SettingsOpts.md).
@@ -344,15 +357,22 @@ require("copilot").setup {
344
357
}
345
358
```
346
359
347
-
### lsp_binary
360
+
### server
361
+
362
+
> [!CAUTION] > `"binary"` mode is still very much experimental, please report any issues you encounter.
348
363
349
-
This allows you to specify the path to the copilot lsp binary.
350
-
This will disable the download of the binary and use the one specified.
364
+
`type` can be either `"nodejs"` or `"binary"`. The binary version will be downloaded if used.
365
+
366
+
`custom_server_filepath` is used to specify the path of either the path (filename included) of the `js` file if using `"nodejs"` or the path to the binary if using `"binary"`.
367
+
When using `"binary"`, the download process will be disabled and the binary will be used directly.
0 commit comments