From a0532aba298c45415d645ab26b35191be917123f Mon Sep 17 00:00:00 2001 From: L3MON4D3 Date: Fri, 15 Sep 2023 15:28:48 +0200 Subject: [PATCH] get_node_range -> range(). --- lua/luasnip/extras/treesitter_postfix.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/luasnip/extras/treesitter_postfix.lua b/lua/luasnip/extras/treesitter_postfix.lua index 6eb0398a7..a8109ace8 100644 --- a/lua/luasnip/extras/treesitter_postfix.lua +++ b/lua/luasnip/extras/treesitter_postfix.lua @@ -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"), @@ -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} }