~ubuntu-elisp/emacs/+git/master:feature/tree-sitter

Last commit made on 2022-11-22
Get this branch:
git clone -b feature/tree-sitter https://git.launchpad.net/~ubuntu-elisp/emacs/+git/master

Branch merges

Branch information

Name:
feature/tree-sitter
Repository:
lp:~ubuntu-elisp/emacs/+git/master

Recent commits

6fde1fc... by Yuan Fu <email address hidden>

Separate tree-sitter and non-tree-sitter variant of sh-mode

Now there are three modes, sh-base-mode, sh-mode, bash-ts-mode.

The change I made: change sh-mode to sh-base-mode, remove docstring.
Below the new sh-base-mode, create a new definition for sh-mode, paste
the dostring, add setup for font-lock-defaults. Below sh-mode, add
bash-ts-mode.

* lisp/progmodes/sh-script.el (sh-mode): Moves all setup into
sh-base-mode, except for the setup for font-lock-defaults and the
docstring.
(sh-base-mode): New mode.
(bash-ts-mode): New mode.

7144e38... by Theodor Thornhill <email address hidden>

Tweak faces in Java and TypeScript

* lisp/progmodes/java-ts-mode.el (java-ts-mode--operators): Remove @
as an operator.

(java-ts-mode--font-lock-settings): Use constant-face for @ to match
rest of the annotation. Add bracket, delimiter and use some of the
new faces.

(java-ts-mode--imenu): Clean up the implementation a little.

(java-ts-mode): Refer to the new features.

* lisp/progmodes/ts-mode.el (ts-mode--font-lock-settings, ts-mode):
Add in bracket and delimiter'.

8083949... by Yuan Fu <email address hidden>

treesit-font-lock-recompute-features now has two modes of operation

1. Set activation of each feature (changes every feature)
2. Add/remove features (only change those explicitly configured by
ADD-LIST and REMOVE-LIST)

This is useful for enabling/disabling certain features for all
modes (without resetting others) by calling this function in
prog-mode-hook

* lisp/treesit.el (treesit-font-lock-recompute-features): See above
description.

ae91d5c... by Yuan Fu <email address hidden>

Tweak c-ts-mode fontification

New features: function and variable, which consistently fontify all
occurrences of functions and variables, respectively.

Remove expression feature, as its purpose is fulfilled by function,
variable, and property combined.

Fix declaration feature, remove unnecessary rule from label
feature.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): See
above description.
(c-ts-mode--fontify-variable): New function.
(c-ts-mode--base-mode): Add & remove features.

40764ac... by Yuan Fu <email address hidden>

; Fix docstrings in treesit.el

* lisp/treesit.el (treesit--explorer--nodes-to-highlight)
(treesit--explorer-draw-node): Fix docstrings.

ca87a01... by Yuan Fu <email address hidden>

* lisp/treesit.el (treesit-max-buffer-size): Enlarge value.

aeadba1... by Yuan Fu <email address hidden>

; * lisp/progmodes/js.el (js-ts-mode): Add autoload cookie.

3f37f6b... by Yuan Fu <email address hidden>

; * test/src/treesit-tests.el (treesit-misc): Remove test.

This test is for treesit--setting-for-mode, which is removed when we
switched from using treesit-settings to using separate major modes.

eb1a35a... by Yuan Fu <email address hidden>

; Update tree-sitter starter guide

* admin/notes/tree-sitter/starter-guide: Reflect recent changes.
* admin/notes/tree-sitter/html-manual/Using-Parser.html:
* admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html:
* admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html:
* admin/notes/tree-sitter/html-manual/Parser_002dbased-Indentation.html:
* admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html:
* admin/notes/tree-sitter/html-manual/Multiple-Languages.html:
* admin/notes/tree-sitter/html-manual/Language-Definitions.html: Update.

abf40a4... by Yuan Fu <email address hidden>

; Fix typo in c-ts-mode--font-lock-settings

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Fix
typo.