Skip to content

Commit

Permalink
get_node_range -> range().
Browse files Browse the repository at this point in the history
  • Loading branch information
L3MON4D3 committed Sep 15, 2023
1 parent 934c757 commit a0532ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/luasnip/extras/treesitter_postfix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ local function generate_resolve_expand_param(match_tsnode, user_resolver)
return nil
end

local start_row, start_col, _, _ = vim.treesitter.get_node_range(prefix_node)
local start_row, start_col, _, _ = prefix_node:range()

local env = {
LS_TSMATCH = vim.split(ts_parser:get_node_text(prefix_node), "\n"),
Expand All @@ -146,7 +146,7 @@ local function generate_resolve_expand_param(match_tsnode, user_resolver)
for capture_name, node in pairs(best_match) do
env["LS_TSCAPTURE_" .. capture_name:upper()] = vim.split(ts_parser:get_node_text(node), "\n")

local from_r, from_c, to_r, to_c = vim.treesitter.get_node_range(node)
local from_r, from_c, to_r, to_c = node:range()
env.LS_TSDATA[capture_name] = {
type = node:type(),
range = { {from_r, from_c}, {to_r, to_c} }
Expand Down

0 comments on commit a0532ab

Please sign in to comment.