From d675d10c7aded87dc102dbfd21a2b9b082f3cdeb Mon Sep 17 00:00:00 2001 From: Yi Ming Date: Thu, 29 Aug 2024 23:19:00 +0800 Subject: [PATCH] feat(shared)!: stop reading metadata from `#make-range!` --- lua/nvim-treesitter-textobjects/shared.lua | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lua/nvim-treesitter-textobjects/shared.lua b/lua/nvim-treesitter-textobjects/shared.lua index 69a804cc..a1cf901e 100644 --- a/lua/nvim-treesitter-textobjects/shared.lua +++ b/lua/nvim-treesitter-textobjects/shared.lua @@ -1,10 +1,6 @@ local ts = vim.treesitter local add_bytes = require("vim.treesitter._range").add_bytes --- luacheck: push ignore 631 ----@alias TSTextObjects.Metadata {range: {[1]: number, [2]: number, [3]: number, [4]: number, [5]: number, [6]: number, [7]: string}} --- luacheck: pop - local M = {} ---@param object any @@ -100,20 +96,6 @@ local get_query_matches = memoize(function(bufnr, query_group, root, root_lang) end end - if metadata.range and metadata.range[7] then - ---@cast metadata TSTextObjects.Metadata - local query_name = metadata.range[7] - local path = vim.split(query_name, "%.") - insert_to_path(prepared_match, path, { - metadata.range[1], - metadata.range[2], - metadata.range[3], - metadata.range[4], - metadata.range[5], - metadata.range[6], - }) - end - matches[#matches + 1] = prepared_match end end