mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-05 13:00:08 -04:00
Fix #206: Use lsp.util.apply_text_edits for smart_rename
This commit is contained in:
parent
23a16ab605
commit
16af10999c
2 changed files with 14 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue