[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 4df35e3491c 1/7: Improve fontification in csharp-ts-mode (bug#5
From: |
Yuan Fu |
Subject: |
emacs-29 4df35e3491c 1/7: Improve fontification in csharp-ts-mode (bug#59909) |
Date: |
Fri, 9 Dec 2022 19:46:43 -0500 (EST) |
branch: emacs-29
commit 4df35e3491cd82ff3ea08f05ded23cb89abadece
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Yuan Fu <casouri@gmail.com>
Improve fontification in csharp-ts-mode (bug#59909)
- Fontity escape sequences.
- Highlight syntax errors.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings)
(csharp-ts-mode): Add new features
---
lisp/progmodes/csharp-mode.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index d0465b26f05..8a7313b1ce8 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -818,7 +818,13 @@ compilation and evaluation time conflicts."
:language 'c-sharp
:feature 'delimiter
- '((["," ":" ";"]) @font-lock-delimiter-face)))
+ '((["," ":" ";"]) @font-lock-delimiter-face)
+
+ :language 'c-sharp
+ :feature 'escape-sequence
+ :override t
+ '((escape_sequence) @font-lock-escape-face
+ (ERROR) @font-lock-warning-face)))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode))
@@ -926,7 +932,7 @@ Key bindings:
(setq-local treesit-font-lock-settings csharp-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list
'(( comment definition)
- ( keyword string type)
+ ( keyword string escape-sequence type)
( attribute constant expression literal)
( bracket delimiter)))
- emacs-29 updated (33a8415eb7e -> 8f53fa10d94), Yuan Fu, 2022/12/09
- emacs-29 4df35e3491c 1/7: Improve fontification in csharp-ts-mode (bug#59909),
Yuan Fu <=
- emacs-29 839341d7370 5/7: Make more granular defun-type-regexp (bug#59873), Yuan Fu, 2022/12/09
- emacs-29 1014bcc8e32 3/7: Fix fontification of method-invocations in js-ts-mode (bug#59904), Yuan Fu, 2022/12/09
- emacs-29 7141920c6af 2/7: Fix escape-sequence feature in typescript-ts-mode (bug#59906), Yuan Fu, 2022/12/09
- emacs-29 8de8f1dc051 6/7: Add class_body indentation for typescript (bug#59680), Yuan Fu, 2022/12/09
- emacs-29 8f53fa10d94 7/7: Fontify "this" as a keyword in c++-ts-mode (bug#59924), Yuan Fu, 2022/12/09
- emacs-29 8f49137c9bf 4/7: Add dockerfile-ts-mode (Bug#59894), Yuan Fu, 2022/12/09