[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 93c8220937 4/7: Reorganize treesit-font-lock-feaure-list's to the
From: |
Yuan Fu |
Subject: |
master 93c8220937 4/7: Reorganize treesit-font-lock-feaure-list's to the new level scheme |
Date: |
Sat, 26 Nov 2022 21:36:30 -0500 (EST) |
branch: master
commit 93c82209374581ae0d52681d56a7dc28e8279f98
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
Reorganize treesit-font-lock-feaure-list's to the new level scheme
* lisp/progmodes/c-ts-mode.el (c-ts-mode--base-mode)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/python.el (python-ts-mode)
* lisp/progmodes/sh-script.el (bash-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode):
Reorganized treesit-font-lock-feature-list.
---
lisp/progmodes/c-ts-mode.el | 8 ++++----
lisp/progmodes/csharp-mode.el | 7 ++++---
lisp/progmodes/java-ts-mode.el | 7 ++++---
lisp/progmodes/js.el | 7 ++++---
lisp/progmodes/python.el | 10 +++++-----
lisp/progmodes/sh-script.el | 8 ++++----
lisp/progmodes/typescript-ts-mode.el | 7 ++++---
7 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index fc35d9aedd..086257483e 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -528,10 +528,10 @@ the subtrees."
(setq-local which-func-functions nil)
(setq-local treesit-font-lock-feature-list
- '(( comment constant keyword literal preprocessor string)
- ( assignment definition label property type)
- ( delimiter error escape-sequence function
- operator variable bracket))))
+ '(( comment definition)
+ ( keyword preprocessor string type)
+ ( assignment constant escape-sequence label literal property )
+ ( bracket delimiter error function operator variable))))
;;;###autoload
(define-derived-mode c-ts-mode c-ts-mode--base-mode "C"
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index a544a4b5cb..d794bc854f 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -974,9 +974,10 @@ Key bindings:
;; Font-lock.
(setq-local treesit-font-lock-settings csharp-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list
- '((comment keyword constant string)
- (type definition expression literal attribute)
- (bracket delimiter)))
+ '(( comment definition)
+ ( keyword string type)
+ ( attribute constant expression literal)
+ ( bracket delimiter)))
;; Imenu.
(setq-local imenu-create-index-function #'csharp-ts-mode--imenu)
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el
index ee2934f53c..dd3d6d31e0 100644
--- a/lisp/progmodes/java-ts-mode.el
+++ b/lisp/progmodes/java-ts-mode.el
@@ -317,9 +317,10 @@ the subtrees."
;; Font-lock.
(setq-local treesit-font-lock-settings java-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list
- '((comment constant keyword string)
- (annotation definition expression literal type)
- (bracket delimiter operator)))
+ '(( comment definition )
+ ( constant keyword string type)
+ ( annotation expression literal)
+ ( bracket delimiter operator)))
;; Imenu.
(setq-local imenu-create-index-function #'java-ts-mode--imenu)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index da05b7b364..f2016deb5d 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3873,9 +3873,10 @@ Currently there are `js-mode' and `js-ts-mode'."
(setq-local treesit-font-lock-settings js--treesit-font-lock-settings)
(setq-local treesit-font-lock-feature-list
'(( comment declaration)
- ( constant expression identifier keyword number string)
- ( bracket delimiter escape-sequence jsx operator
- pattern property)))
+ ( keyword string)
+ ( constant escape-sequence expression
+ identifier jsx number pattern property)
+ ( bracket delimiter operator)))
;; Imenu
(setq-local imenu-create-index-function
#'js--treesit-imenu)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 9bbcac612f..acfee21135 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -6615,11 +6615,11 @@ implementations: `python-mode' and `python-ts-mode'."
(when (treesit-ready-p 'python)
(treesit-parser-create 'python)
(setq-local treesit-font-lock-feature-list
- '(( comment string definition)
- ( keyword builtin constant type)
- ( assignment decorator escape-sequence
- string-interpolation number property
- operator bracket delimiter)))
+ '(( comment definition)
+ ( keyword string type)
+ ( assignment builtin constant decorator
+ escape-sequence number property string-interpolation )
+ ( bracket delimiter operator)))
(setq-local treesit-font-lock-settings python--treesit-settings)
(setq-local imenu-create-index-function
#'python-imenu-treesit-create-index)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 067aef8669..e11fb42fc8 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -1608,10 +1608,10 @@ with your script for an edit-interpret-debug cycle."
"Major mode for editing Bash shell scripts."
(when (treesit-ready-p 'bash)
(setq-local treesit-font-lock-feature-list
- '(( comment function heredoc string)
- ( command declaration-command keyword number variable)
- ( bracket builtin-variable constant delimiter
- misc-punctuation operator)))
+ '(( comment function)
+ ( command declaration-command keyword string)
+ ( builtin-variable constant heredoc number variable)
+ ( bracket delimiter misc-punctuation operator)))
(setq-local treesit-font-lock-settings
sh-mode--treesit-settings)
(treesit-major-mode-setup)))
diff --git a/lisp/progmodes/typescript-ts-mode.el
b/lisp/progmodes/typescript-ts-mode.el
index 763686bf66..c7b332c614 100644
--- a/lisp/progmodes/typescript-ts-mode.el
+++ b/lisp/progmodes/typescript-ts-mode.el
@@ -320,9 +320,10 @@
;; Font-lock.
(setq-local treesit-font-lock-settings
typescript-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list
- '((comment declaration)
- (constant expression identifier keyword number string)
- (bracket delimiter jsx pattern property)))
+ '(( comment declaration)
+ ( keyword string)
+ ( constant expression identifier jsx number pattern property)
+ ( bracket delimiter)))
;; Imenu.
(setq-local imenu-create-index-function #'js--treesit-imenu)
- master updated (14d54212ea -> a3d8da2476), Yuan Fu, 2022/11/26
- master d884b43634 1/7: Partially fix some python tests (bug#59477), Yuan Fu, 2022/11/26
- master 447b9d48d9 3/7: Add treesit-font-lock-level, Yuan Fu, 2022/11/26
- master 3fe5fc3dc1 6/7: Make bash-ts-mode fall back to sh-mode if the file isn't in Bash, Yuan Fu, 2022/11/26
- master a3d8da2476 7/7: Make typescript-ts-mode not fallback to js-mode, Yuan Fu, 2022/11/26
- master cc086f37e8 2/7: Add default limit for tree-sitter recursive tree-traversing function, Yuan Fu, 2022/11/26
- master bd10c3cfa2 5/7: Correctly fontify types in typeof() expression in csharp-ts-mode, Yuan Fu, 2022/11/26
- master 93c8220937 4/7: Reorganize treesit-font-lock-feaure-list's to the new level scheme,
Yuan Fu <=