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
This commit is contained in:
parent
33a8415eb7
commit
4df35e3491
1 changed files with 8 additions and 2 deletions
|
@ -818,7 +818,13 @@ compilation and evaluation time conflicts."
|
||||||
|
|
||||||
:language 'c-sharp
|
:language 'c-sharp
|
||||||
:feature 'delimiter
|
: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
|
;;;###autoload
|
||||||
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode))
|
(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-settings csharp-ts-mode--font-lock-settings)
|
||||||
(setq-local treesit-font-lock-feature-list
|
(setq-local treesit-font-lock-feature-list
|
||||||
'(( comment definition)
|
'(( comment definition)
|
||||||
( keyword string type)
|
( keyword string escape-sequence type)
|
||||||
( attribute constant expression literal)
|
( attribute constant expression literal)
|
||||||
( bracket delimiter)))
|
( bracket delimiter)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue