[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode e5704af123 09/10: Merge pull request #171
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode e5704af123 09/10: Merge pull request #171 from Fuco1/bugfix/fontify-return-type-function-type |
Date: |
Sat, 30 Jul 2022 06:59:04 -0400 (EDT) |
branch: elpa/typescript-mode
commit e5704af123d9e77b1f3d716996078ffbdc056ffe
Merge: ec2c4c11fc ba047458dd
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: GitHub <noreply@github.com>
Merge pull request #171 from Fuco1/bugfix/fontify-return-type-function-type
fix(fontlock): fontify return type in a function type definition
---
typescript-mode-general-tests.el | 6 +++++-
typescript-mode.el | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/typescript-mode-general-tests.el b/typescript-mode-general-tests.el
index 33d5850f80..34add73657 100644
--- a/typescript-mode-general-tests.el
+++ b/typescript-mode-general-tests.el
@@ -589,7 +589,11 @@ should be fontified as variable, keyword and type."
(test-with-fontified-buffer
"private genericArray3: SomeType<Foo[]>[];"
(should (eq (get-face-at "SomeType") 'font-lock-type-face))
- (should (eq (get-face-at "Foo") 'font-lock-type-face))))
+ (should (eq (get-face-at "Foo") 'font-lock-type-face)))
+
+ (test-with-fontified-buffer
+ "const f: () => SomeType = () => {}"
+ (should (eq (get-face-at "SomeType") 'font-lock-type-face))))
(ert-deftest font-lock/type-names-level4-namespaces ()
"Namespaced Typenames should be highlighted in declarations"
diff --git a/typescript-mode.el b/typescript-mode.el
index 98d20eb7ef..e3ad84c499 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2011,9 +2011,10 @@ This performs fontification according to
`typescript--class-styles'."
;; - private genericArray: SomeType<Foo>[]
;; - function testFunc(): SomeType<> {
;; - function testFunc(a): a is SomeType<> {
+ ;; - () => SomeType
;; TODO: namespaced classes!
,(list
- (concat ":\\s-\\(?:\\s-*\\(" typescript--name-re
"\\)\\s-*\\(is\\)\\s-*\\)?" "\\(" typescript--type-name-re "\\)\\(<"
typescript--type-name-re ">\\)?\\(\[\]\\)?\\([,;]\\)?\\s-*{?")
+ (concat "\\(?::\\|=>\\)\\s-\\(?:\\s-*\\(" typescript--name-re
"\\)\\s-*\\(is\\)\\s-*\\)?" "\\(" typescript--type-name-re "\\)\\(<"
typescript--type-name-re ">\\)?\\(\[\]\\)?\\([,;]\\)?\\s-*{?")
'(1 'font-lock-variable-name-face nil t)
'(2 'font-lock-keyword-face nil t)
'(3 'font-lock-type-face))
- [nongnu] elpa/typescript-mode updated (83bf47e406 -> acd8d79952), ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode d21c9837cb 04/10: feat(fontlock): fontify arrow fn arguments, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode 84bab53b7a 05/10: test(fontlock): update tests related to arglist fontification, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode acd8d79952 10/10: Merge pull request #170 from Fuco1/feature/fontify-arrow-fn-args, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode 93e1040ea9 01/10: feat(tests): use font-lock-ensure instead of font-lock-fontify-buffer, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode e5704af123 09/10: Merge pull request #171 from Fuco1/bugfix/fontify-return-type-function-type,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode ec2c4c11fc 08/10: Merge pull request #172 from Fuco1/fix/keywords-method-calls, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode 367cfb70f5 02/10: fix(fontlock): do not fontify function calls as keywords, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode 9bd226b386 06/10: fix(fontlock): do not fontify builtins in object/interface key context, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode ba047458dd 03/10: fix(fontlock): fontify return type in a function type definition, ELPA Syncer, 2022/07/30
- [nongnu] elpa/typescript-mode 35f01b3aeb 07/10: Merge pull request #173 from Fuco1/fix/keywords-in-interfaces, ELPA Syncer, 2022/07/30