From 78b447a5378bc890260ef0e594e991b5cdfc5662 Mon Sep 17 00:00:00 2001 From: "Tristan (t4t5)" Date: Thu, 30 Apr 2026 11:53:07 +0100 Subject: [PATCH] Use vim.treesitter.get_parser for nvim-treesitter main compat The nvim-treesitter master branch was archived and its main-branch rewrite no longer exposes `parsers.get_parser`. Switch to the built-in `vim.treesitter.get_parser`, which has been stable since Neovim 0.9 and works on both branches. --- lua/bitcoin-script-hints/init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/bitcoin-script-hints/init.lua b/lua/bitcoin-script-hints/init.lua index 9e160c1..7b7a3a5 100644 --- a/lua/bitcoin-script-hints/init.lua +++ b/lua/bitcoin-script-hints/init.lua @@ -1,4 +1,3 @@ -local parsers = require('nvim-treesitter.parsers') local op_effects = require("bitcoin-script-hints.op-codes") local M = {} @@ -176,7 +175,7 @@ function M.setup() ) ]]) - local parser = parsers.get_parser(bufnr) + local parser = vim.treesitter.get_parser(bufnr) local tree = parser:parse()[1] local root = tree:root()