From: Yuan Fu <casouri@gmail.com>
To: "Mattias Engdegård" <mattias.engdegard@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Standardizing tree-sitter fontification features
Date: Fri, 2 Dec 2022 17:12:20 -0800 [thread overview]
Message-ID: <5B7EE037-C85A-411C-B42B-1E234EE66DFA@gmail.com> (raw)
In-Reply-To: <2AEA8AB6-593E-4D89-AB05-0C8EB2BCE327@gmail.com>
[Addint emacs-devel back]
> On Nov 25, 2022, at 3:20 AM, Mattias Engdegård <mattias.engdegard@gmail.com> wrote:
>
>> Right now we have:
> [...]
>> comment
>
> What about treating doc-comments as a separate case?
> (May also want to fontify various parts inside, such as doc mark-up elements.)
That makes me wonder what should we do with string & docstrings & string-interpolation. Should we make them all separate features, or put them all in a single “string” feature, or have some major mode variable to turn things on/off?
My thoughts:
- docstring is pretty standard for a given language, so they can probably enabled by default and be part of the string feature.
- string interpolation could be part of string feature, but since “string” feature is enabled at pretty low fontification level, I decided to make it separate, and only enabled it in higher fontification levels.
- doc-comment seems rather non-standards, and could even be different from project to project. So I tend to think it should be turned on/off by a major mode variable in major modes that support this feature. And user can enable/disable it with dir-local or file-local variables.
>
> Otherwise I mostly agree with the proposal but fear that it may result in an overly busy scheme. Colour only really helps when it helps highlighting structure, not contents.
I agree, that’s why we don’t enable all the features by default. The default fontification should be pretty sane (IMO).
Yuan
next prev parent reply other threads:[~2022-12-03 1:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 22:16 Standardizing tree-sitter fontification features Yuan Fu
2022-11-25 1:13 ` Randy Taylor
2022-11-25 6:15 ` Yuan Fu
2022-11-25 19:03 ` Randy Taylor
2022-11-25 20:55 ` Yuan Fu
2022-11-26 3:35 ` Randy Taylor
2022-12-05 21:17 ` Yuan Fu
2022-11-25 8:13 ` Eli Zaretskii
2022-11-25 19:14 ` Randy Taylor
2022-11-26 14:07 ` Stephen Leake
2022-11-25 2:56 ` Stefan Monnier
2022-11-25 6:34 ` Yuan Fu
2022-11-25 14:52 ` Stefan Monnier
2022-11-26 14:03 ` Stephen Leake
2022-11-26 14:29 ` [SPAM UNSURE] " Stephen Leake
2022-11-26 22:05 ` [SPAM UNSURE] " Yuan Fu
[not found] ` <2AEA8AB6-593E-4D89-AB05-0C8EB2BCE327@gmail.com>
2022-12-03 1:12 ` Yuan Fu [this message]
2022-12-03 14:34 ` Mattias Engdegård
2022-12-05 8:58 ` Theodor Thornhill
2022-12-05 10:26 ` Mattias Engdegård
2022-12-05 11:30 ` Theodor Thornhill
2022-12-05 21:02 ` Yuan Fu
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=5B7EE037-C85A-411C-B42B-1E234EE66DFA@gmail.com \
--to=casouri@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=mattias.engdegard@gmail.com \
/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.