all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Randy Taylor <dev@rjt.dev>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: More font-lock faces for tree-sitter
Date: Fri, 28 Oct 2022 02:26:45 +0000	[thread overview]
Message-ID: <pGu46tF5MCeYF2UFV0aB9g8zdGNIebn3MnGmydIzBt5Kj20DX6HnUid-NQJOpQIDvsgY6vbHoz8pc5--0i1FBW6FSMlp9EOt1SfXPDRojsQ=@rjt.dev> (raw)

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

Hi.

Since tree-sitter will allow for more fine-grained syntax highlighting, I think it would be useful to define more faces to give the user more customization for syntax highlighting.
I already make use of these for my own queries.

Here are some that I had in mind:
- font-lock-escape-face
- For escape characters in strings.
- font-lock-property-face
- Usually an object property, like a member in a class or struct.
- font-lock-punctuation-face
- In addition, we could get even more specific: font-lock-punctuation-{delimiter, bracket, special}
- font-lock-number-face
- font-lock-operator-face

We can certainly get even more fine-grained, but I think this is a good start and wanted to kick off the discussion. Feel free to offer more suggestions.
Happy to send a patch for the above if interested.

[-- Attachment #2: Type: text/html, Size: 1620 bytes --]

             reply	other threads:[~2022-10-28  2:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28  2:26 Randy Taylor [this message]
2022-10-28  7:04 ` More font-lock faces for tree-sitter Eli Zaretskii
2022-10-28 12:48 ` Stefan Monnier
2022-10-28 15:10 ` Stefan Kangas
2022-10-28 15:29   ` Eli Zaretskii
2022-10-28 17:47     ` Yuan Fu
2022-10-28 15:53   ` 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

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

  git send-email \
    --in-reply-to='pGu46tF5MCeYF2UFV0aB9g8zdGNIebn3MnGmydIzBt5Kj20DX6HnUid-NQJOpQIDvsgY6vbHoz8pc5--0i1FBW6FSMlp9EOt1SfXPDRojsQ=@rjt.dev' \
    --to=dev@rjt.dev \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.