unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Trevor Arjeski <tmarjeski@gmail.com>
Cc: Randy Taylor <dev@rjt.dev>, Eli Zaretskii <eliz@gnu.org>,
	74277@debbugs.gnu.org, acidbong@tilde.club
Subject: bug#74277: 29.4; rust-ts-mode doesn't highlight some function calls
Date: Wed, 1 Jan 2025 19:17:22 -0800	[thread overview]
Message-ID: <C248AE78-6E17-40DC-A89A-C9A431940CDC@gmail.com> (raw)
In-Reply-To: <89EB0889-DD32-40C2-92E3-8A89ABB6EE37@gmail.com>



> On Nov 24, 2024, at 11:34 PM, Yuan Fu <casouri@gmail.com> wrote:
> 
> 
> 
>> On Nov 23, 2024, at 11:17 PM, Trevor Arjeski <tmarjeski@gmail.com> wrote:
>> 
>> Yuan Fu <casouri@gmail.com> writes:
>> 
>>>> On Nov 21, 2024, at 7:30 PM, Randy Taylor <dev@rjt.dev> wrote:
>>>> 
>>>> On Wednesday, November 20th, 2024 at 13:22, Trevor Arjeski <tmarjeski@gmail.com> wrote:
>>>>> 
>>>>> Trevor Arjeski tmarjeski@gmail.com writes:
>>>>> 
>>>>> 
>>>>> I decided to hack around with this a little bit and found that adding
>>>>> the following lines partially works:
>>>>> 
>>>>> 
>>>>> I'm sure there is an issue with solving it this way, I just need someone
>>>>> else more experienced to confirm. It is finicky where it turns the
>>>>> highlighting on and off when you make some code changes, for example
>>>>> adding and removing the semi-colon after the macro invocation.
>>>> 
>>>> Yuan would be the best to answer that.
>>> 
>>> Using injection (what Emacs calls local parser, same thing) here is fine, I
>>> think. As Randy said, tree-sitter doesn’t have a good answer for macros. If nvim
>>> uses this workaround (create an injection for the macro and parses it like
>>> normal rust code), then it should be fine for us to follow suit.
>>> 
>> 
>> Any ideas why my crude implementation of the injection "flickers" on and
>> off after certain changes?
>> 
>> Thanks,
>> Trevor
> 
> So, after spending a night on this, it appears to be a tree-sitter bug :( I created an issue here: https://github.com/tree-sitter/tree-sitter/issues/3962

According to tree-sitter devs, the tree-sitter bug should be fixed now.

Yuan




  reply	other threads:[~2025-01-02  3:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 20:24 bug#74277: 29.4; rust-ts-mode doesn't highlight some function calls acidbong--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-09  8:52 ` Eli Zaretskii
2024-11-10 21:10   ` Randy Taylor
2024-11-19 20:48     ` Trevor Arjeski
2024-11-20 12:34       ` Acid Bong via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-20 18:22       ` Trevor Arjeski
2024-11-22  3:30         ` Randy Taylor
2024-11-24  5:18           ` Yuan Fu
2024-11-24  7:17             ` Trevor Arjeski
2024-11-25  7:34               ` Yuan Fu
2025-01-02  3:17                 ` Yuan Fu [this message]
2025-01-02  6:11                   ` Stefan Kangas
2025-01-03  6:04                     ` Yuan Fu
2025-01-04 13:20                       ` Eli Zaretskii
2024-12-14 19:25             ` Randy Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C248AE78-6E17-40DC-A89A-C9A431940CDC@gmail.com \
    --to=casouri@gmail.com \
    --cc=74277@debbugs.gnu.org \
    --cc=acidbong@tilde.club \
    --cc=dev@rjt.dev \
    --cc=eliz@gnu.org \
    --cc=tmarjeski@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).