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

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

bug#61302: 29.0.60; rust-ts-mode does not show function-invocation on fi


From: Dmitry Gutov
Subject: bug#61302: 29.0.60; rust-ts-mode does not show function-invocation on field-properties
Date: Wed, 15 Feb 2023 00:14:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 14/02/2023 14:39, Randy Taylor wrote:
On Tuesday, February 14th, 2023 at 06:42, Jostein Kjønigsen <jostein@secure.kjonigsen.net> wrote:
Haven given the latest patch a try on a less macro-ridden codebase I have to
say it looks a lot better. In general I would say for this other code-base it looks favourable to rust-mode.

If there's one thing which still seems to be done better in rust-mode
(not nitpicking the variable highlighting), it would be fully namespaces function calls within classes.

Consider the following code:

extern crate claxon;
let result = claxon::FlacReader::open(path);

While rust-ts-mode correctly identifies that open() is a function-call,
rust-mode correctly identified FlacReader as a class.

Thanks for testing. I've attached a patch fixing this.

I had deleted a query I thought was now covered :). I look forward to the day we have highlight tests!

Thank you, looks almost perfect (see below), I've pushed that to emacs-29.

Highlighting tests are a pain to write, but the initiative is always welcome. ;-) In the meantime, at least tree-sitter validates the queries, which lowers the odds of typos in font-lock rules.

Speaking of a problem, the solution with applying the explicit 'default' face doesn't seem ideal. Aside from the redundancy in the resulting buffer structure (with very little practical downside), it also makes the 'vc-diff' buffers look like this on the attached screenshots (the 'default' face's background overrides the greens and reds).

I couldn't find a quick solution to this problem, so I pushed the existing code for now.

Attachment: Screenshot from 2023-02-14 23-42-25.png
Description: PNG image

Attachment: Screenshot from 2023-02-14 23-42-40.png
Description: PNG image


reply via email to

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