julia-ts-mode icon indicating copy to clipboard operation
julia-ts-mode copied to clipboard

PR 135 Recent change in grammar causes issues in font locking (syntax highlighting)

Open dhanak opened this issue 6 months ago • 8 comments

Hi,

I've been using Emacs 29.4 with julia-ts-mode for a while with great statisfaction. However, a recent update to the libtree-sitter-julia.so grammar causes the following error in font locking, and as a result, I don't get any syntax highlighting at all:

Error during redisplay: (jit-lock-function 1501) signaled (treesit-query-error "Node type error at" 177 "(assignment (identifier) @font-lock-variable-name-face (_)) (assignment (field_expression (identifier) \".\" (identifier) @font-lock-variable-name-face) (operator)) (assignment (bare_tuple (identifier) @font-lock-variable-name-face)) (assignment (bare_tuple (field_expression (identifier) \".\" (identifier) @font-lock-variable-name-face)) (operator)) (local_statement (identifier) @font-lock-variable-name-face) (let_binding (identifier) @font-lock-variable-name-face) (global_statement (identifier) @font-lock-variable-name-face)" "Debug the query with `treesit-query-validate'")

I assume something changed in the grammar that the ts-mode implementation didn't follow, but I can't figure out how to debug this. I see in the issue history that there have been similar issues in the past, so I'm hoping that there should be a fix for this.

I observed this issue first when I tried to update the grammar on April 12 this year, but I don't know exactly what version I had before that worked. The issue persists with the most recent grammar version.

Any help would be appreciated!

dhanak avatar Aug 29 '24 10:08 dhanak