[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Call for volunteers: add tree-sitter support to major modes
From: |
Eli Zaretskii |
Subject: |
Call for volunteers: add tree-sitter support to major modes |
Date: |
Sun, 09 Oct 2022 12:03:48 +0300 |
The Emacs 29 release branch is planned to be cut in about 1.5 months,
and we want tree-sitter support to be in Emacs 29. The Emacs Git
repository has a feature branch that integrates tree-sitter with
Emacs. That branch is being prepared for landing on master. However,
currently there's only one major-mode which can use tree-sitter
support on the branch: Python mode. We need to add tree-sitter
integration to more major modes, so that Emacs 29 could have
reasonably useful tree-sitter support options in at least the popular
major modes.
This is a call for volunteers to work on adding tree-sitter support to
major modes beyond Python, and on improving the existing support in
Python mode.
Some of the popular major modes for which we would like to see
tree-sitter support in Emacs 29 are:
c-mode
c++-mode
emacs-lisp-mode
js-mode
js-json-mode
ruby-mode
shell-script-mode
We probably won't have all of them by Emacs 29, but we hope to have at
least some.
So if you are interested in enhancing your favorite major-mode with
tree-sitter support, and by doing that making Emacs 29 much better,
please checkout the feature/tree-sitter branch, and start working on
some mode(s). Tree-sitter support for a major-mode should include
enhancement of one or more of the following Emacs features:
- font-lock
- indentation
- navigation (beginning-of-defun-function etc.)
- imenu
- which-func
- thing-at-point
We think that font-lock is the absolute minimum, followed by
indentation.
To help with this effort, Yuan Fu, who did most of the development on
this feature branch, wrote a document with guidance notes which aim to
help you implement tree-sitter support for the above features. You
will find that document and some other helpful documentation in the
admin/notes/tree-sitter directory and its subdirectories on the
branch. That directory also includes scripts for easy compilation of
tree-sitter language modules (which you will need to download from the
tree-sitter site).
We hope that the existing support for Python can serve as working
example of how to add tree-sitter support for other major modes, and
together with the guidance document it will allow you to add support
for more modes with minimum effort. Don't hesitate to ask questions
if something is unclear or you need more advice.
We hope volunteers will step forward in time to make tree-sitter
integration in Emacs 29 functional and useful. To avoid waste of
effort, please announce here on which major mode(s) you decided to
work.
Thanks in advance.
- Call for volunteers: add tree-sitter support to major modes,
Eli Zaretskii <=
- Re: Call for volunteers: add tree-sitter support to major modes, Theodor Thornhill, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Eli Zaretskii, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Theodor Thornhill, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Eli Zaretskii, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Theodor Thornhill, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Eli Zaretskii, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Theodor Thornhill, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Theodor Thornhill, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Yuan Fu, 2022/10/09
- Re: Call for volunteers: add tree-sitter support to major modes, Yuan Fu, 2022/10/10