Annotate locations_to_items() and friends with valid offset_encoding#56
Open
lyokha wants to merge 2 commits into
Open
Annotate locations_to_items() and friends with valid offset_encoding#56lyokha wants to merge 2 commits into
lyokha wants to merge 2 commits into
Conversation
In Neovim 0.10, lack of the offset encoding value leads to warnings like "show_document must be called with valid offset encoding". This commit fixes such warnings. Note that the fix in actions.lua is rather insufficient as it involves a global variable that must be adjusted on every usage which is not the case right now: it gets adjusted only in M.close_edit().
- In close_selected_handler(), get buffer and then the value of offset_encoding with vim.api.nvim_get_current_buffer() and vim.lsp.get_clients(). - In codeaction_selection_handler(), we can safely ignore this because setting vim.lsp.handlers['textDocument/codeAction'] doesn't affect anything in Neovim 0.10, see details in a FIXME comment in the commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In Neovim 0.10, lack of the offset encoding value leads to warnings like
show_document must be called with valid offset encoding. This commit fixes such warnings. Note that the fix in actions.lua is rather insufficient as it involves a global variable that must be adjusted on every usage which is not the case right now: it gets adjusted only inM.close_edit().