]> git.eshelyaron.com Git - emacs.git/commitdiff
Fontify doc comment in c-ts-mode with doc-face
authorYuan Fu <casouri@gmail.com>
Thu, 9 May 2024 03:27:12 +0000 (20:27 -0700)
committerEshel Yaron <me@eshelyaron.com>
Fri, 10 May 2024 13:33:25 +0000 (15:33 +0200)
* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add
rule for /** comments.

(cherry picked from commit 03d4b96da62fbb7abfb7fa8fcfc963313e394f22)

lisp/progmodes/c-ts-mode.el

index ce2deb8f6a64d787ce14505f889ebd9fc70d966e..a81b9e09091aa841d78fd09948e8820814e84cfe 100644 (file)
@@ -597,8 +597,9 @@ MODE is either `c' or `cpp'."
   (treesit-font-lock-rules
    :language mode
    :feature 'comment
-   `((comment) @font-lock-comment-face
-     (comment) @contextual)
+   `(((comment) @font-lock-doc-face
+      (:match ,(rx bos "/**") @font-lock-doc-face))
+     (comment) @font-lock-comment-face)
 
    :language mode
    :feature 'preprocessor