aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-05-29 16:52:20 +0200
committerChristian Clason <c.clason@uni-graz.at>2025-05-12 18:43:40 +0200
commit9c0a99819c99d70d28334dc6ea1c3ac773e4fed1 (patch)
tree24d6d9ebdf2b9aa9a11c9ee271fa5e80d96fe6da /plugin
parentrefactor: rewrite installation using jobs and async (diff)
downloadnvim-treesitter-9c0a99819c99d70d28334dc6ea1c3ac773e4fed1.tar
nvim-treesitter-9c0a99819c99d70d28334dc6ea1c3ac773e4fed1.tar.gz
nvim-treesitter-9c0a99819c99d70d28334dc6ea1c3ac773e4fed1.tar.bz2
nvim-treesitter-9c0a99819c99d70d28334dc6ea1c3ac773e4fed1.tar.lz
nvim-treesitter-9c0a99819c99d70d28334dc6ea1c3ac773e4fed1.tar.xz
nvim-treesitter-9c0a99819c99d70d28334dc6ea1c3ac773e4fed1.tar.zst
nvim-treesitter-9c0a99819c99d70d28334dc6ea1c3ac773e4fed1.zip
ci: remove update-lockfile shell script
Diffstat (limited to 'plugin')
-rw-r--r--plugin/query_predicates.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugin/query_predicates.lua b/plugin/query_predicates.lua
index abffea2f0..8c7685faf 100644
--- a/plugin/query_predicates.lua
+++ b/plugin/query_predicates.lua
@@ -1,6 +1,6 @@
local query = vim.treesitter.query
--- register custom predicates
+-- register custom predicates (overwrite existing; needed for CI)
---@param match (TSNode|nil)[]
---@param pred string[]
@@ -13,7 +13,7 @@ query.add_predicate('kind-eq?', function(match, _, _, pred)
local types = { unpack(pred, 3) }
return vim.list_contains(types, node:type())
-end)
+end, true)
-- register custom directives
@@ -43,7 +43,7 @@ query.add_directive('set-lang-from-mimetype!', function(match, _, bufnr, pred, m
local parts = vim.split(type_attr_value, '/', {})
metadata['injection.language'] = parts[#parts]
end
-end)
+end, true)
local injection_aliases = {
ex = 'elixir',
@@ -68,7 +68,7 @@ query.add_directive('set-lang-from-info-string!', function(match, _, bufnr, pred
local injection_alias = vim.treesitter.get_node_text(node, bufnr)
local filetype = vim.filetype.match({ filename = 'a.' .. injection_alias })
metadata['injection.language'] = filetype or injection_aliases[injection_alias] or injection_alias
-end)
+end, true)
query.add_directive('downcase!', function(match, _, bufnr, pred, metadata)
local text, key, value ---@type string|string[], string, string|integer
@@ -95,7 +95,7 @@ query.add_directive('downcase!', function(match, _, bufnr, pred, metadata)
else
metadata[key] = string.lower(text)
end
-end)
+end, true)
-- Trim blank lines from end of the region
-- Arguments are the captures to trim.
@@ -138,4 +138,4 @@ query.add_directive('trim!', function(match, _, bufnr, pred, metadata)
metadata[id].range = { start_row, start_col, end_row, end_col }
end
end
-end)
+end, true)