Skip to content

Commit 1f87b56

Browse files
MuntasirSZNAntoineGS
authored andcommitted
feat: faq section
Closes #352, Closes #247
1 parent 174cc54 commit 1f87b56

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ As lua is far more efficient and makes things easier to integrate with modern pl
3131
- [server](#server)
3232
- [Commands](#commands)
3333
- [Integrations](#integrations)
34+
- [FAQ](#faq)
3435
<!--toc:end-->
3536

3637
## Requirements
@@ -340,7 +341,7 @@ copilot_node_command = vim.fn.expand("$HOME") .. "/.config/nvm/versions/node/v20
340341

341342
Override copilot lsp client settings. The `settings` field is where you can set the values of the options defined in [SettingsOpts.md](./SettingsOpts.md).
342343
These options are specific to the copilot lsp and can be used to customize its behavior. Ensure that the name field is not overridden as is is used for
343-
efficiency reasons in numerous checks to verify copilot is actually running. See `:h vim.lsp.start_client` for list of options.
344+
efficiency reasons in numerous checks to verify copilot is actually running. See `:h vim.lsp.start` for list of options.
344345

345346
Example:
346347

@@ -432,3 +433,28 @@ The `copilot.api` module can be used to build integrations on top of `copilot.lu
432433
- [giuxtaposition/blink-cmp-copilot](https://github.com/giuxtaposition/blink-cmp-copilot): Integration with [`blink.cmp`](https://github.com/Saghen/blink.cmp).
433434
- [fang2hou/blink-copilot](https://github.com/fang2hou/blink-copilot): Integration with [`blink.cmp`](https://github.com/Saghen/blink.cmp), with some differences.
434435
- [AndreM222/copilot-lualine](https://github.com/AndreM222/copilot-lualine): Integration with [`lualine.nvim`](https://github.com/nvim-lualine/lualine.nvim).
436+
437+
## FAQ
438+
439+
> Certificate Parsing Error
440+
441+
This is an issue with the copilot lsp itself as described in [this discussion](https://github.com/orgs/community/discussions/136273#discussioncomment-10433527). Please update copilot lsp to the latest version to solve this issue.
442+
If updating didn't help, update the `/usr/bin/update-ca-trust` and remove the --comment option from the trust extract commands.
443+
444+
> Multiple offset encodings warning
445+
446+
As discussed in #247 ,The problem arises because two or more clients are using different offset encodings. To solve this, in lspconfig:
447+
448+
```lua
449+
local capabilities = vim.lsp.protocol.make_client_capabilities() -- Get The capabilities
450+
capabilities.general.positionEncodings = { "utf-16" } -- Set the offset encoding, see `:h vim.lsp.start` for more info
451+
require("lspconfig")[server].setup({ capabilities = capabilities }) -- Setup the server
452+
```
453+
Set the same for copilot in `server_opts_overrides`:
454+
455+
```lua
456+
server_opts_overrides = {
457+
offset_encoding = "utf-16" -- Set the offset encoding same as above, see `:h vim.lsp.start` for more info
458+
}
459+
```
460+
Refer to your plugins documentation for changes.

0 commit comments

Comments
 (0)