Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple offset encodings warning when used with clangd #247

Open
herrglocke opened this issue Dec 7, 2023 · 5 comments
Open

Multiple offset encodings warning when used with clangd #247

herrglocke opened this issue Dec 7, 2023 · 5 comments

Comments

@herrglocke
Copy link

In C++ files when clangd is attached and copilot.lua is loaded, a repeated warning about Multiple offset encodings occurs. This seems to be a common issue as well when using null-ls at the same time as clangd but the fixes used for that do not seem to work with copilot.lua.

@MunifTanjim
Copy link
Collaborator

Can you provide more details about how to reproduce it? I don't use clangd for my day job, and unless you give me exact steps to reproduce the issue I can't help.

@herrglocke
Copy link
Author

herrglocke commented Dec 10, 2023

To reproduce, load copilot.lua and let clangd attach itself to a buffer. The below warning then repeatedly pops up for any cursor change or edit whether inside Insert mode or outside. When I do :Copilot disable, this stops occurring.

image

@JunkLeo
Copy link

JunkLeo commented Dec 16, 2023

To reproduce, load copilot.lua and let clangd attach itself to a buffer. The below warning then repeatedly pops up for any cursor change or edit whether inside Insert mode or outside. When I do :Copilot disable, this stops occurring.

image

Got the same warning!

@asharkhan3101
Copy link

asharkhan3101 commented Dec 18, 2023

This isn't an copilot.lua issue.

jose-elias-alvarez/null-ls.nvim#428

The problem ariese because two clients copilot and clangd using different offset_encoding attached to same buffer, solution proposed in the thread is to either change clangd's or in this case copilot offset encoding. By default, clangd uses utf-32 offset encoding.

@weeebdev
Copy link

weeebdev commented May 11, 2024

This isn't an copilot.lua issue.

jose-elias-alvarez/null-ls.nvim#428

The problem ariese because two clients copilot and clangd using different offset_encoding attached to same buffer, solution proposed in the thread is to either change clangd's or in this case copilot offset encoding. By default, clangd uses utf-32 offset encoding.

by any chance, do you know how to change the offset for copilot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants