aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2022-01-13 09:28:27 -0800
committerGitHub <noreply@github.com>2022-01-13 18:28:27 +0100
commit8066abcd65a672010e7159bcb9601f6eb5481e81 (patch)
tree1ded8ae9432a70552cd39db56827a2522c4dc126 /runtime/lua/vim/lsp/handlers.lua
parent9304ee3874fc1e0608a9902cf5b1b0ac6645ef0a (diff)
downloadrneovim-8066abcd65a672010e7159bcb9601f6eb5481e81.tar.gz
rneovim-8066abcd65a672010e7159bcb9601f6eb5481e81.tar.bz2
rneovim-8066abcd65a672010e7159bcb9601f6eb5481e81.zip
fix(lsp): forward offset_encoding in rename handler (#17079)
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 4c0ca28bb9..ddfcbf5f75 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -225,9 +225,10 @@ M['textDocument/documentSymbol'] = response_to_list(util.symbols_to_items, 'docu
M['workspace/symbol'] = response_to_list(util.symbols_to_items, 'symbols')
--see: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rename
-M['textDocument/rename'] = function(_, result, _)
+M['textDocument/rename'] = function(_, result, ctx, _)
if not result then return end
- util.apply_workspace_edit(result)
+ local client = vim.lsp.get_client_by_id(ctx.client_id)
+ util.apply_workspace_edit(result, client.offset_encoding)
end
--see: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rangeFormatting