From 94d4e43827d7ffe934ae230bd9adc94e22d4bd7d Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Wed, 22 Jul 2026 02:10:34 +0200 Subject: [PATCH] Remove deprecated is-not? predicate The is-not? predicate is not implemented in clients, including Neovim. It won't be implemented, and is deprecated upstream, pending removal. Drop it, making the affected rules unconditional, and enabling queries to work on all clients. --- queries/highlights.scm | 6 ++---- test/highlight/variables.js | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index 9312d682..3219cf0e 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -59,12 +59,10 @@ (#match? @constant "^[A-Z_][A-Z\\d_]+$")) ((identifier) @variable.builtin - (#match? @variable.builtin "^(arguments|module|console|window|document)$") - (#is-not? local)) + (#match? @variable.builtin "^(arguments|module|console|window|document)$")) ((identifier) @function.builtin - (#eq? @function.builtin "require") - (#is-not? local)) + (#eq? @function.builtin "require")) ; Literals ;--------- diff --git a/test/highlight/variables.js b/test/highlight/variables.js index 93ad4317..a446e0e0 100644 --- a/test/highlight/variables.js +++ b/test/highlight/variables.js @@ -13,12 +13,12 @@ module.exports = function(one, two) { if (something()) { let module = null, one = 1; - // ^ variable + // ^ variable.builtin // ^ variable console.log(module, one, two); // ^ variable.builtin - // ^ variable + // ^ variable.builtin // ^ variable // ^ variable.parameter }