unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: Yuan Fu <casouri@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [SPAM UNSURE] Average-user-facing interface for tree-sitter
Date: Wed, 12 Oct 2022 23:32:25 -0700	[thread overview]
Message-ID: <8635bsfd3a.fsf@stephe-leake.org> (raw)
In-Reply-To: <86czawfsq6.fsf@stephe-leake.org> (Stephen Leake's message of "Wed, 12 Oct 2022 17:54:41 -0700")

Stephen Leake <stephen_leake@stephe-leake.org> writes:

> Yuan Fu <casouri@gmail.com> writes:
>
>> From the suggestions I collected from the old thread, here is my proposal:
>>
>> We define a custom option treesit-settings (we can discuss the name
>> later), which controls whether to enable/disable tree-sitter for each
>> major mode, and the default preference, like this:
>>
>> (defcustom treesit-settings '((t nil nil))
>>   "Tree-sitter toggles for major modes.
>>
>> A list of (MODE ENABLE INHERIT).  MODE is a major mode, ENABLE
>> can be one of the following:
>>
>>   demand => Demand the use of tree-sitter, warn if can't enable.
>>   t => Enable if available
>>   nil => Don't enable
>>
>> If INHERIT is nil, the setting does't apply to derived modes of
>> MODE, if t, the setting does apply.
>>
>> If MODE is t, the settings applies to all the modes which don't
>> have any setting.  INHERIT doesn't matter for this special
>> default setting."
>>   :type …)
>
> This is reasonable, but I think we will need finer control. LSP has
> dozens of features that can be individually supported or not by a given
> server. I don't think Emacs needs to go that far (although eglot does
> support that). I think separate control for face, indent, xref, and
> maybe imenu would be reasonable.
>
> In the above, perhaps ENABLE could be a symbol if it controls all
> features for a mode, or a plist to specify features separately:
>
> (mode (:face ENABLE :indent ENABLE ...) INHERIT).
>
> I'm not sure if INHERIT needs to be similarly split.

As I mentioned in my other email, also signature-help, completion,
diagnostics.

-- 
-- Stephe



  reply	other threads:[~2022-10-13  6:32 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  6:11 Average-user-facing interface for tree-sitter Yuan Fu
2022-10-13  0:54 ` [SPAM UNSURE] " Stephen Leake
2022-10-13  6:32   ` Stephen Leake [this message]
2022-10-13  6:22 ` Lars Ingebrigtsen
2022-10-13  9:18   ` Robert Pluim
2022-10-13  9:21     ` Lars Ingebrigtsen
2022-10-13  9:32     ` Po Lu
2022-10-13  9:42       ` Robert Pluim
2022-10-13 12:31         ` Stefan Kangas
2022-10-13  9:57     ` Daniel Martín
2022-10-13 10:01     ` [SPAM UNSURE] " Stephen Leake
2022-10-13 14:32   ` Jostein Kjønigsen
2022-10-13 16:14     ` Eli Zaretskii
2022-10-13 17:27     ` Lars Ingebrigtsen
2022-10-13 19:44   ` Yuan Fu
2022-10-14 11:02     ` Lars Ingebrigtsen
2022-10-14 11:22       ` Stephen Leake
2022-10-14 20:10         ` Yuan Fu
2022-10-14 20:19       ` Yuan Fu
2022-10-14 20:49     ` Stefan Monnier
2022-10-14 22:51       ` Yuan Fu
2022-10-15  3:26         ` Stefan Monnier
2022-10-15  5:05           ` Yuan Fu
2022-10-17  9:07             ` Yuan Fu
2022-10-17  9:15               ` Lars Ingebrigtsen
2022-10-18 20:54                 ` Yuan Fu
2022-10-18 21:48                   ` Stefan Monnier
2022-10-18 22:06                     ` Yuan Fu
2022-10-18 22:31                       ` Stefan Monnier
2022-10-18 23:06                         ` Yuan Fu
2022-10-19  2:52                           ` Stefan Monnier
2022-10-19  3:48                             ` [External] : " Drew Adams
2022-10-20  0:23                             ` Yuan Fu
2022-10-19  5:35                           ` Theodor Thornhill
2022-10-20  0:28                             ` Yuan Fu
2022-10-20  7:44                               ` Theodor Thornhill
2022-10-20 17:53                                 ` Stefan Monnier
2022-10-20 18:10                                   ` Theodor Thornhill
2022-10-20 18:11                                     ` Theodor Thornhill
2022-10-20 23:06                                     ` Yuan Fu
2022-10-21 22:10                                       ` Yuan Fu
2022-10-21 22:35                                         ` Stefan Monnier
2022-10-23  1:59                                           ` Fu Yuan
2022-10-23  4:59                                             ` Theodor Thornhill
2022-10-24 12:57                                             ` Stefan Monnier
2022-10-24 17:14                                               ` Stephen Leake
2022-10-24 21:07                                                 ` Stefan Monnier
2022-10-24 20:51                                               ` Yuan Fu
2022-10-24 23:55                                                 ` Stefan Monnier
2022-10-25 21:37                                                   ` Yuan Fu
2022-10-25 22:49                                                     ` Stefan Monnier
2022-10-27  1:56                                                       ` Yuan Fu
2022-10-27 15:21                                                         ` Stefan Monnier
2022-10-27 15:29                                                           ` Dmitry Gutov
2022-10-28  8:02                                                             ` Yuan Fu
2022-10-24 16:46                                             ` Stephen Leake
2022-10-18 20:49             ` Stefan Monnier
2022-10-18 20:58               ` Yuan Fu
2022-10-13 13:05 ` Stefan Monnier

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=8635bsfd3a.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=casouri@gmail.com \
    --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 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).