]> git.eshelyaron.com Git - emacs.git/commitdiff
Reorganize treesit-font-lock-feaure-list's to the new level scheme
authorYuan Fu <casouri@gmail.com>
Sat, 26 Nov 2022 23:05:57 +0000 (15:05 -0800)
committerYuan Fu <casouri@gmail.com>
Sat, 26 Nov 2022 23:40:24 +0000 (15:40 -0800)
* 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
lisp/progmodes/csharp-mode.el
lisp/progmodes/java-ts-mode.el
lisp/progmodes/js.el
lisp/progmodes/python.el
lisp/progmodes/sh-script.el
lisp/progmodes/typescript-ts-mode.el

index fc35d9aeddae079e3e2a47c18b0a09906f957ca6..086257483e85403471b018397f9e81047b61e8e4 100644 (file)
@@ -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"
index a544a4b5cbd5492875739c97e2a7cae448190358..d794bc854fe6b25097c34a8b6b2eb26120e1db1a 100644 (file)
@@ -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)
index ee2934f53c6e98f5b0a816c67dc8edce8c53760d..dd3d6d31e02607b5f295369a25c9787d8ba2455d 100644 (file)
@@ -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)
index da05b7b364a09fae7a7b7db56506744f2081a772..f2016deb5d8b6f00d3c33476a5bf8d6e0d3fd757 100644 (file)
@@ -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)
index 9bbcac612fd5e15bdce56d5619981d66e19d5f3b..acfee21135801a9f2bdb242649688e7ce41bef5b 100644 (file)
@@ -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)
index 067aef86692f22ce2eccb51f2d9f564954104019..e11fb42fc88d494da19cdd6485cfadef4a5b043f 100644 (file)
@@ -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)))
index 763686bf6609929b766e6e66a968acaa3568fd0d..c7b332c61495c159048e113c3090849ab7b834c1 100644 (file)
     ;; 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)