[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode ec2c4c11fc 08/10: Merge pull request #172
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode ec2c4c11fc 08/10: Merge pull request #172 from Fuco1/fix/keywords-method-calls |
Date: |
Sat, 30 Jul 2022 06:59:04 -0400 (EDT) |
branch: elpa/typescript-mode
commit ec2c4c11fcb6d9e8e626cadd28b5d411f0825d0e
Merge: 35f01b3aeb 367cfb70f5
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: GitHub <noreply@github.com>
Merge pull request #172 from Fuco1/fix/keywords-method-calls
fix(fontlock): do not fontify function calls as keywords
---
typescript-mode-general-tests.el | 11 +++++++++++
typescript-mode.el | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/typescript-mode-general-tests.el b/typescript-mode-general-tests.el
index ad5ed6220f..33d5850f80 100644
--- a/typescript-mode-general-tests.el
+++ b/typescript-mode-general-tests.el
@@ -396,6 +396,17 @@ snake_cased_function(1, 2, 3)"
(("endpoint" "data") . nil)
(("<" ">" ",") . nil))))
+(ert-deftest font-lock/method-call-with-keyword-name ()
+ "If the name of the function/method is a keyword, it should still be
highlighted as function."
+ (test-with-fontified-buffer
+ "const app = express();
+app.get()
+app.post()
+app.delete()"
+ (should (eq (get-face-at "get") 'font-lock-function-name-face))
+ (should (eq (get-face-at "post") 'font-lock-function-name-face))
+ (should (eq (get-face-at "delete") 'font-lock-function-name-face))))
+
(ert-deftest font-lock/generics ()
"Tests that type hints within generics are highlighted properly."
(font-lock-test
diff --git a/typescript-mode.el b/typescript-mode.el
index 215a5d8585..98d20eb7ef 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2028,7 +2028,7 @@ This performs fontification according to
`typescript--class-styles'."
,@typescript--font-lock-keywords-3
(,typescript--decorator-re (1 font-lock-function-name-face))
- (,typescript--function-call-re (1 font-lock-function-name-face))
+ (,typescript--function-call-re (1 font-lock-function-name-face t))
(,typescript--builtin-re (1 font-lock-type-face))
;; arrow function
- [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, 2022/07/30
- [nongnu] elpa/typescript-mode ec2c4c11fc 08/10: Merge pull request #172 from Fuco1/fix/keywords-method-calls,
ELPA Syncer <=
- [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