From: Noah Peart <noah.v.peart@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Dmitry Gutov <dmitry@gutov.dev>, 67809@debbugs.gnu.org
Subject: bug#67809: [PATCH] Add font-locking for assignments in typescript-ts-mode
Date: Sat, 23 Dec 2023 05:39:17 -0500 [thread overview]
Message-ID: <CAPVBTSfP1hmihWZDS0tmNytqRUik6hBZQM4jGY4hNuQJ7p+Z+A@mail.gmail.com> (raw)
In-Reply-To: <83zfy1e28w.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
I think this should be closed for now.
On Sat, Dec 23, 2023 at 3:45 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > Cc: 67809@debbugs.gnu.org
> > Date: Wed, 13 Dec 2023 22:45:51 +0200
> > From: Dmitry Gutov <dmitry@gutov.dev>
> >
> > On 13/12/2023 21:26, Noah Peart wrote:
> > > I thought `font-lock-variable-name-face` was standard for
> assignments?
> > > It's what is applied
> > > in ruby-ts-mode, python-ts-mode, and c-ts-mode for example. I like it
> > > personally, cause
> > > it allows for visual distinction between l/r values.
> >
> > ruby and python's parsers cannot distinguish between assignments that
> > introduce a new variable (thus working as an implicit declaration) and
> > those that reassign an existing variable. Hopefully, we'll be able to
> > improve that in the future.
> >
> > TypeScript, however, has explicit variable declarations.
> >
> > > Either way, I think the patch can be simplified to only highlight the
> > > variable being assigned
> > > and not any others on the left-hand side. It would be simpler and
> more
> > > customizable
> > > to highlight any remaining variables in a `variable` feature in a
> > > following rule.
> >
> > I'm also not sure I agree that, for example, 'arr' is the variable being
> > assigned to in the first example. Its value (the reference) doesn't
> change.
> >
> > But it's totally fine to add a 'variable' feature to
> > typescript-ts-mode's font-lock to apply font-lock-variable-use-face to
> it.
>
> What is the conclusion here? Do we have an agreed-upon patch to
> install?
>
> Thanks.
>
[-- Attachment #2: Type: text/html, Size: 2240 bytes --]
next prev parent reply other threads:[~2023-12-23 10:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 8:33 bug#67809: [PATCH] Add font-locking for assignments in typescript-ts-mode Noah Peart
2023-12-13 18:31 ` Dmitry Gutov
2023-12-13 19:26 ` Noah Peart
2023-12-13 20:45 ` Dmitry Gutov
2023-12-23 8:45 ` Eli Zaretskii
2023-12-23 10:39 ` Noah Peart [this message]
2023-12-23 11:21 ` Eli Zaretskii
2023-12-23 20:57 ` Dmitry Gutov
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=CAPVBTSfP1hmihWZDS0tmNytqRUik6hBZQM4jGY4hNuQJ7p+Z+A@mail.gmail.com \
--to=noah.v.peart@gmail.com \
--cc=67809@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
--cc=eliz@gnu.org \
/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).