[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/typescript-mode 7f4bf6cad9 075/222: Highlight function nam
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/typescript-mode 7f4bf6cad9 075/222: Highlight function name for exported or declared functions. |
Date: |
Sun, 6 Feb 2022 16:59:19 -0500 (EST) |
branch: elpa/typescript-mode
commit 7f4bf6cad90be52f6c443f9e28145087d2e93c33
Author: Jack Williams <jw@jackw.io>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>
Highlight function name for exported or declared functions.
---
typescript-mode.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/typescript-mode.el b/typescript-mode.el
index a2150a7a4c..a7f5970d2f 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -104,6 +104,10 @@ and group 3 is the 'function' keyword.")
"Regexp matching a typescript explicit prototype \"class\" declaration.
An example of this is \"Class.prototype = { method1: ...}\".")
+(defconst typescript--module-declaration-re
+ "^\\s-*\\(?:declare\\|\\(?:export\\(?:\\s-+default\\)?\\)\\)?"
+ "Regexp matching ambient declaration modifier or export declaration")
+
;; var NewClass = BaseClass.extend(
(defconst typescript--mp-class-decl-re
(concat "^\\s-*var\\s-+"
@@ -249,7 +253,8 @@ name as matched contains
(defconst typescript--function-heading-1-re
(concat
- "^\\s-*function\\s-+\\(" typescript--name-re "\\)")
+ typescript--module-declaration-re
+ "\\s-*function\\s-+\\(" typescript--name-re "\\)")
"Regexp matching the start of a typescript function header.
Match group 1 is the name of the function.")
- [nongnu] branch elpa/typescript-mode created (now e824162051), ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a09bd6b0e7 001/222: initial commit, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 49b3cc1c4a 022/222: added "as" and "from" keywords, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 256d930586 010/222: Add type keyword from TypeScript 1.4, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 77aa2b44af 019/222: Merge pull request #14 from valerian/readonly, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 3b0ace2a71 037/222: Add GPLv3 license file to repo., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 9dde78e730 042/222: Add Travis CI build-status to readme., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 7f4bf6cad9 075/222: Highlight function name for exported or declared functions.,
ELPA Syncer <=
- [nongnu] elpa/typescript-mode 2573266955 086/222: Fix a bug in handling function return type annotations., ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode b62f52a35c 009/222: Add let, const, namespace keywords from 1.5, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 976ae69337 003/222: add url, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 514d6f0416 012/222: Add 'async' and 'await' as keywords, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode d27114244a 014/222: added "abstract" keyword, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 54e0c562d4 020/222: removed keyword "bool" which is deprecated since TypeScript 0.9, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode d81cc72782 013/222: Merge pull request #7 from paulkoerbitz/patch-1, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode a532ef57cf 046/222: Merge pull request #29 from lddubeau/fix/method-generator, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode c1a7d40dd8 005/222: highlight template string, ELPA Syncer, 2022/02/06
- [nongnu] elpa/typescript-mode 8fe879a96d 028/222: Support 'of' keyword., ELPA Syncer, 2022/02/06