Subject: bug#61913: java-ts-mode query error for string highlight, due to recent commit in tree-sitter-java.

From: Vincenzo Pupillo <[email-masked]>
Date: Thu, 02 Mar 2023 13:21:05 +0100

Hi, 
a recent commit in tree-sitter-java (https://github.com/tree-sitter/tree-sitter-java/commit/2b3b776b953a34ccffb647dd89732db79690d4c5) 
removed "text_block" from grammar.js. This causes a bug in java-ts-mode when treesit-fon-lock-level is > 1

Error during redeployment: (jit-lock-function 8295) reported (treesit-query-error "Node type error at" 42 "(string_literal) @font-lock-string-face (text_block) @font-lock-string-face" "Debugging the query with `treesit-query-validate'")

The attached patch fixes the problem. 
Thank you very much.

Vincenzo

diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index d31d2d71c3..176636aa7c 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -183,7 +183,6 @@ java-ts-mode--font-lock-settings
    :override t
    :feature 'string
    `((string_literal) @font-lock-string-face
-     (text_block) @font-lock-string-face)
    :language 'java
    :override t
    :feature 'literal