-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can offset_encoding
for Ruff be configured in Neovim?
#14483
Comments
I'm a bit confused by this warning because ruff isn't a client but a server. Ruff also negotiates the encoding with the client. That makes me suspect that another server doesn't support the position encoding negotiation and always enforces utf16 (in which case the previously negotiated utf8 encoding with ruff is outdated). But that seems like a neovim issue. Ideally neovim would re-negotiate with ruff if that happens I found a related neovim issue neovim/nvim-lspconfig#2184 It seems that setting the position encoding to the one encoding supported by all servers fix the warning |
It seems that Neovim added support for UTF-8 and UTF-32 quite recently (last week) neovim/neovim#31209 which means that you must be running nightly Neovim. I think this is the reason that Ruff will select UTF-8 because the client now supports it: ruff/crates/ruff_server/src/server.rs Lines 271 to 283 in f8c2025
|
@Shinzu Can you try running the latest nightly version of Neovim? I don't see any warnings on the latest |
offset_encoding
for Ruff be configured in Neovim?
The function has been deprecated where the warning is being raised (https://github.com/neovim/neovim/blob/01026ba47ba8a656bb5cd09afbb25b4b33c0b752/runtime/lua/vim/lsp/util.lua#L1889-L1920) and the It's marked as a breaking change (neovim/neovim#31249), so you might want to update your dotfiles and / or wait for the ecosystem to catch up (plugins). |
Thank you both for your answers. Yes i'm running nightly. I will just wait. :) |
I'll close this issue because I understand that this is an issue with neovim. Let me know if there's something that's left unanswered or if there's something we could do on our side. |
Hello,
is it possible to configure the
offset_enconding
for ruff in neovim?Background:
by default ruff has configured
utf-8
, when you use it together withpyright
which is default toutf-16
neovim will produce a warning:The text was updated successfully, but these errors were encountered: