bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70299: 30.0.50; go-ts-mode + tree-sitter-go@v0.20.0 no highlighting


From: Martin
Subject: bug#70299: 30.0.50; go-ts-mode + tree-sitter-go@v0.20.0 no highlighting
Date: Tue, 9 Apr 2024 14:08:01 +0100

I can see this in *Messages*

Error during redisplay: (jit-lock-function 6092) signaled (treesit-query-error "Node type error at" 150 "(function_declaration name: (identifier) @font-lock-function-name-face) (method_declaration name: (field_identifier) @font-lock-function-name-face) (method_spec name: (field_identifier) @font-lock-function-name-face) (field_declaration name: (field_identifier) @font-lock-property-name-face) (parameter_declaration name: (identifier) @font-lock-variable-name-face) (short_var_declaration left: (expression_list (identifier) @font-lock-variable-name-face (\",\" (identifier) @font-lock-variable-name-face) *)) (var_spec name: (identifier) @font-lock-variable-name-face (\",\" name: (identifier) @font-lock-variable-name-face) *)" "Debug the query with `treesit-query-validate'")

On Tue, Apr 9, 2024 at 12:55 PM Martin <martin.tang365@googlemail.com> wrote:
I tried manually applying that patch to my local emacs - it didn't seem to fix the issue of no syntax highlighting?

On Tue, Apr 9, 2024 at 6:47 AM Yuan Fu <casouri@gmail.com> wrote:


> On Apr 8, 2024, at 10:23 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> Date: Tue, 9 Apr 2024 00:43:57 +0100
>> From:  Martin via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> - emacs -Q;
>> - M-x treesit-install-language-grammar
>>  - go
>>  - github.com/tree-sitter/tree-sitter-go
>>
>> - Open up a new buffer and use go-ts-mode
>> - Write some go-code
>> ```
>> package my_pkg
>> type myStruct struct {}
>> func MyFunc(x context.Context) error {}
>> ```
>> - Observe that there is no syntax highlighting
>> - Observe that treesit-explore-mode seems to work properly
>> - Conclude that there is something wrong with go-ts-mode's
>>  highlighting. There is highlighting with tree-sitter-go v0.19.1, but
>>  that grammar also seems to come with some bugs.
>
> Isn't this a duplicate of bug#70296?

Yeah, Martin contacted me on Reddit because he didn’t know how to report this issue, and I told him he can use M-x bug-report-emacs, which he did. Thanks Martin!

Meanwhile I wrote a patch and sent it in bug#70296. Let me merge these two reports.

Yuan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]