GNU bug report logs -
#61302
29.0.60; rust-ts-mode does not show function-invocation on field-properties
Previous Next
Reported by: jostein <at> kjonigsen.net
Date: Sun, 5 Feb 2023 20:16:01 UTC
Severity: normal
Found in version 29.0.60
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #133 received at 61302 <at> debbugs.gnu.org (full text, mbox):
On Saturday, February 18th, 2023 at 19:13, Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> On 19/02/2023 01:31, Randy Taylor wrote:
>
> > Fix one bug, introduce another 😉.
> >
> > Any use declaration tail (I guess that's the lingo we're using?) should not have a face applied to it if it's lowercase.
>
>
> I guess we do. Unless you have better naming suggestions ;-)
Nope, I like it :).
>
> > For example:
> > `use deeply::nested::function as other_function;`
> > function should not have any face applied to it.
> >
> > `use a::b::{C, d, e::F, g::h::I, g::h::i};`
> > i should not have any face applied to it.
> >
> > Only if they are capitalized should we give them a face: font-lock-type-face.
> > As it stands now, they are all font-lock-constant-face.
> >
> > The previous patch was perfect except for the missing use_as_clause queries - if I add those back, I think everything is good unless I'm missing something.
>
>
> Thanks for catching that, I missed one treesit-node-parent call when
> inlining a function.
Looks good now!
>
> > > > The variable feature is highlighting some things incorrectly (it was before too, but I think it's a little worse now).
> > > > Adding these to rust-ts-mode--variable-p takes care of the issues that I see.
> > > > `((equal "extern_crate_declaration" parent-type) nil) ((equal "lifetime" parent-type) nil) ((equal "scoped_type_identifier" parent-type) nil) ((equal "use_as_clause" parent-type) nil) ((equal "use_list" parent-type) nil)`
> > >
> > > This should be taken care of by the new approach (enumeration of all
> > > allowed parent types).
> > > Missing:
> > > (closure_parameters (identifier) @font-lock-variable-name-face)
>
>
> This one goes into the 'definition' feature. I just made that change
> today in emacs-29, check it out.
>
> > (field_initializer value: (identifier) @font-lock-variable-name-face)
>
>
> Thanks, added. Also added unary_expression.
>
> > Would it be possible to alphabetize the queries in the variable feature BTW? It makes it easier to see what's there/missing.
> > And you know I like things alphabetized 😉.
>
>
> No problem! I generally like to group by functionality, but alphabetic
> is fine, and this case seems particularly suited to it.
>
> See the revised in attachment.
Ship it!
Thanks for working on this.
This bug report was last modified 2 years and 91 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.