Fix #206: Use lsp.util.apply_text_edits for smart_rename

This commit is contained in:
Stephan Seitz 2020-07-20 20:58:00 +02:00 committed by Stephan Seitz
parent 23a16ab605
commit 16af10999c
2 changed files with 14 additions and 7 deletions

View file

@ -186,4 +186,12 @@ function M.is_in_node_range(node, line, col)
end
end
function M.node_to_lsp_range(node)
local start_line, start_col, end_line, end_col = node:range()
local rtn = {}
rtn.start = { line = start_line, character = start_col }
rtn['end'] = { line = end_line, character = end_col }
return rtn
end
return M