From: Noah Peart <noah.v.peart@gmail.com>
To: Randy Taylor <dev@rjt.dev>
Cc: 71209@debbugs.gnu.org
Subject: bug#71209: [PATCH] Add font-locking for variables in go-ts-mode range clauses
Date: Thu, 30 May 2024 06:25:56 -0700 [thread overview]
Message-ID: <CAPVBTScr+MC=TBjACN9F1iD=q4OoMFfmJYhu6VU8RmeAEhnpBg@mail.gmail.com> (raw)
In-Reply-To: <Lk8GVhHxj9l9YfGAD2qgrbdR62tNZ1XXxujRsud8RPCiyFZtUb1E_1_CLdZbk-9RUWKAZQcH6gcijrXwnudX9mj9J5xKUL-yZQQMQ5wJ94s=@rjt.dev>
[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]
> it seems we already highlight this when at treesit-font-lock-level 4?
They get highlighted with `font-lock-variable-use-face` at level 4, but
shouldn't
they be getting `font-lock-variable-name-face` in the 'definition feature?
On Mon, May 27, 2024 at 7:46 PM Randy Taylor <dev@rjt.dev> wrote:
> On Sunday, May 26th, 2024 at 08:41, Noah Peart <noah.v.peart@gmail.com>
> wrote:
>
> > Tags: patch
> >
> > Adds font-locking rule in go-ts-mode to give variables in range clauses
> > font-lock-variable-name-face (in feature 'definition).
> >
> > For example, the following font-locking is added:
> >
> > for idx, val := range arr {}
> > // ^ font-lock-variable-name-face
> > // ^ font-lock-variable-name-face
> >
> > The patch also adds a test case.
> >
> >
> > In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> > 3.24.33, cairo version 1.16.0) of 2024-05-21 built on noah-X580VD
> > Repository revision: 63d914e377f7cc37056de2503bfbeea831875037
> > Repository branch: master
> > Windowing system distributor 'The X.Org Foundation', version
> 11.0.12101004
> > System Description: Ubuntu 22.04.4 LTS
> >
> > Configured using:
> > 'configure --prefix=/usr/local --with-modules --with-tree-sitter
> > --with-threads --with-x-toolkit=gtk3 --with-xwidgets --with-gnutls
> > --with-json --with-mailutils --with-jpeg --with-png --with-rsvg
> > --with-tiff --with-xml2 --with-xpm --with-imagemagick CC=gcc-12
> > CXX=gcc-12'
>
> Thanks, but it seems we already highlight this when at
> treesit-font-lock-level 4?
>
[-- Attachment #2: Type: text/html, Size: 2104 bytes --]
next prev parent reply other threads:[~2024-05-30 13:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-26 12:41 bug#71209: [PATCH] Add font-locking for variables in go-ts-mode range clauses Noah Peart
2024-05-28 2:46 ` Randy Taylor
2024-05-30 13:25 ` Noah Peart [this message]
2024-05-30 23:23 ` Dmitry Gutov
2024-06-01 1:09 ` Randy Taylor
2024-06-01 1:42 ` Noah Peart
2024-06-01 1:50 ` Noah Peart
2024-06-01 14:13 ` Dmitry Gutov
2024-06-01 1:51 ` Dmitry Gutov
2024-06-01 1:56 ` Noah Peart
2024-06-01 1:59 ` Dmitry Gutov
2024-06-01 2:04 ` Noah Peart
2024-06-01 14:13 ` Dmitry Gutov
2024-06-15 7:56 ` Eli Zaretskii
2024-06-27 7:38 ` Eli Zaretskii
2024-06-27 9:29 ` Noah Peart
2024-07-06 7:46 ` Eli Zaretskii
2024-07-20 9:42 ` Eli Zaretskii
2024-08-04 7:52 ` Eli Zaretskii
2024-06-01 1:56 ` 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='CAPVBTScr+MC=TBjACN9F1iD=q4OoMFfmJYhu6VU8RmeAEhnpBg@mail.gmail.com' \
--to=noah.v.peart@gmail.com \
--cc=71209@debbugs.gnu.org \
--cc=dev@rjt.dev \
/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).