-
Notifications
You must be signed in to change notification settings - Fork 177
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
bug: vim.lsp.util.make_position_params()
requires position/offset encoding on Nighly
#606
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
Is there any workaround for this message? |
Seems since this PR neovim/neovim#31249, the function will cause warning. |
As for the first usage in line 175, I believe that you can probably just use the first client's offset encoding with something like: local clients = vim.lsp.get_clients({ bufnr = buf })
local params = opts.params or vim.lsp.util.make_position_params(win, clients[1].offset_encoding or 'utf-16') However, there is a second instance of EDITI have tested this with a few of my own projects, and this is at the very least a workaround for the warning message on open. My use case does not require getting the full hierarchy and therefore it does not trigger the issue in regards to the second usage of |
@kenielf So I think we should wait for |
@tan-wei I applied the changes manually by modifying the |
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.11.0-dev-1247+g5897994cb7
Operating system/version
Debian Trixie
Describe the bug
On nightly,
vim.lsp.util.make_position_params()
requires a second argumentposition_encoding
. Otherwise it generates this warning message:trouble.nvim/lua/trouble/sources/lsp.lua
Line 175 in 46cf952
Upstream change: neovim/neovim#31249
I guess
client
and/orclient.offset_encoding
has to be propagated.Steps To Reproduce
:Trouble lsp_implementations
on some identifier.Expected Behavior
Expect no warning.
Repro
No response
The text was updated successfully, but these errors were encountered: