unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61913: java-ts-mode query error for string highlight, due to recent commit in tree-sitter-java.
@ 2023-03-02 12:21 Vincenzo Pupillo
  2023-03-02 12:51 ` Vincenzo Pupillo
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Vincenzo Pupillo @ 2023-03-02 12:21 UTC (permalink / raw)
  To: 61913

[-- Attachment #1: Type: text/plain, Size: 561 bytes --]

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





[-- Attachment #2: java_ts_mode_string_highlight.patch --]
[-- Type: text/x-patch, Size: 424 bytes --]

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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-03-09 17:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 12:21 bug#61913: java-ts-mode query error for string highlight, due to recent commit in tree-sitter-java Vincenzo Pupillo
2023-03-02 12:51 ` Vincenzo Pupillo
2023-03-02 13:01 ` Eli Zaretskii
2023-03-02 16:18   ` Vincenzo Pupillo
2023-03-03 22:32 ` Yuan Fu
2023-03-04  7:10   ` Eli Zaretskii
2023-03-04  9:27     ` Yuan Fu
2023-03-05 13:50       ` Vincenzo Pupillo
2023-03-05 15:09         ` Eli Zaretskii
2023-03-06  6:12           ` Theodor Thornhill via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-03-06 14:03             ` Vincenzo Pupillo
2023-03-09 10:24               ` Eli Zaretskii
2023-03-09 12:49                 ` Vincenzo Pupillo
2023-03-09 15:28                   ` Eli Zaretskii
2023-03-09 16:16               ` Dmitry Gutov
2023-03-09 16:49                 ` Vincenzo Pupillo
2023-03-09 17:08                   ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).