[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tree-sitter api (Was: Re: How to add pseudo vector types)
From: |
Eli Zaretskii |
Subject: |
Re: Tree-sitter api (Was: Re: How to add pseudo vector types) |
Date: |
Sat, 07 Aug 2021 09:26:30 +0300 |
> From: Fu Yuan <casouri@gmail.com>
> Date: Sat, 7 Aug 2021 00:31:36 -0500
> Cc: cpitclaudel@gmail.com, stephen_leake@stephe-leake.org,
> monnier@iro.umontreal.ca, emacs-devel@gnu.org
>
> > We should probably start thinking how to integrate TS-related
> > functionalities into Emacs in general. E.g., should there be an
> > option to activate it? should this option be per major mode? something
> > else?
>
> We should have a user option to control tree-sitter on major mode level.
> Maybe an alist where each car is a major node symbol and each cdr is a
> Boolean value toggling tree-sitter for that node.
>
> We also need tree-sitter-maximum-buffer-size, so that buffer larger than this
> size won’t enable tree-sitter. (And we need to make sure we never use
> tree-sitter on buffers larger than 4GB because tree-sitter uses unint32.)
>
> And we can provide a function free-sitter-should-activate-p that computes if
> we should enable tree-sitter in the current buffer by variables mentioned
> above, that can be used by major-modes when setting up.
>
> I’m also thinking about having a tree-sitter-defaults that’s analogous to
> font-lock-defaults, that is set by each major node and used to generate
> tree-sitter-font-lock-settings.
>
> As for indentation, we could provide some infrastructure like we do for
> font-locking, or we can just let major modes implement their indent function
> with tree-sitter api.
SGTM, thanks.
- Re: How to add pseudo vector types, (continued)
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/03
- Re: How to add pseudo vector types, Fu Yuan, 2021/08/03
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/03
- Re: How to add pseudo vector types, Fu Yuan, 2021/08/03
- Re: How to add pseudo vector types, Stefan Monnier, 2021/08/03
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/03
- Re: How to add pseudo vector types, Yuan Fu, 2021/08/05
- Re: How to add pseudo vector types, Eli Zaretskii, 2021/08/06
- Tree-sitter api (Was: Re: How to add pseudo vector types), Fu Yuan, 2021/08/07
- Re: Tree-sitter api (Was: Re: How to add pseudo vector types),
Eli Zaretskii <=
- Re: Tree-sitter api, Stefan Monnier, 2021/08/07
- Re: Tree-sitter api, Theodor Thornhill, 2021/08/07
- Re: Tree-sitter api, Stefan Monnier, 2021/08/07
- Re: Tree-sitter api, Yuan Fu, 2021/08/17
- Re: Tree-sitter api, Stephen Leake, 2021/08/18
- Re: Tree-sitter api, Yuan Fu, 2021/08/18
- Re: [SPAM UNSURE] Re: Tree-sitter api, Stephen Leake, 2021/08/19
- Re: Tree-sitter api, Yuan Fu, 2021/08/23
- Re: [SPAM UNSURE] Re: Tree-sitter api, Stephen Leake, 2021/08/24
- Re: [SPAM UNSURE] Tree-sitter api, Yuan Fu, 2021/08/27