build: deprecated treesitter method

This commit is contained in:
Folke Lemaitre 2023-04-16 11:35:35 +02:00
parent 02c5e8d953
commit 36aa64bc0b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -256,7 +256,7 @@ function M.plugins(path)
local function find_plugins(node)
if node:type() == "string" then
local text = vim.treesitter.query.get_node_text(node, source):sub(2, -2)
local text = vim.treesitter.get_node_text(node, source):sub(2, -2)
if text:find("/") and #node:parent():field("name") == 0 then
local plugin_node = node:parent():parent()
if plugin_node:named_child(0):field("value")[1]:id() ~= node:id() then