+5
-3
lines changedFilter options
+5
-3
lines changed Original file line number Diff line number Diff line change
@@ -225,9 +225,10 @@ M['textDocument/documentSymbol'] = response_to_list(util.symbols_to_items, 'docu
225
225
M['workspace/symbol'] = response_to_list(util.symbols_to_items, 'symbols')
226
226
227
227
--see: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rename
228
-
M['textDocument/rename'] = function(_, result, _)
228
+
M['textDocument/rename'] = function(_, result, ctx, _)
229
229
if not result then return end
230
-
util.apply_workspace_edit(result)
230
+
local client = vim.lsp.get_client_by_id(ctx.client_id)
231
+
util.apply_workspace_edit(result, client.offset_encoding)
231
232
end
232
233
233
234
--see: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rangeFormatting
Original file line number Diff line number Diff line change
@@ -737,7 +737,8 @@ end
737
737
738
738
--- Applies a `WorkspaceEdit`.
739
739
---
740
-
---@param workspace_edit (table) `WorkspaceEdit`
740
+
---@param workspace_edit table `WorkspaceEdit`
741
+
---@param offset_encoding string utf-8|utf-16|utf-32 (required)
741
742
--see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_applyEdit
742
743
function M.apply_workspace_edit(workspace_edit, offset_encoding)
743
744
if offset_encoding == nil then
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4