emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/graphql-mode bf0412def0 006/122: Better fontification of t


From: ELPA Syncer
Subject: [nongnu] elpa/graphql-mode bf0412def0 006/122: Better fontification of type [implements X]?
Date: Sat, 29 Jan 2022 08:03:27 -0500 (EST)

branch: elpa/graphql-mode
commit bf0412def0dc8909367a2ebe2ed5b5b648599a73
Author: David Vazquez Pua <davazp@gmail.com>
Commit: David Vazquez Pua <davazp@gmail.com>

    Better fontification of type [implements X]?
---
 graphql.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/graphql.el b/graphql.el
index 7429d78cad..884eeede23 100644
--- a/graphql.el
+++ b/graphql.el
@@ -50,8 +50,17 @@
 
 (defvar graphql-font-lock-keywords
   `(
+    ;; Type definition
+    ("\\(type\\)[[:space:]]+\\(\\w+\\)"
+     (1 font-lock-keyword-face)
+     (2 font-lock-function-name-face)
+     ("[[:space:]]+\\(implements\\)\\(?:[[:space:]]+\\(\\w+\\)\\)?"
+      nil nil
+      (1 font-lock-keyword-face)
+      (2 font-lock-function-name-face)))
+
     ;; Definitions
-    (,(concat "\\(" (regexp-opt '("type" "input" "interface")) "\\)"
+    (,(concat "\\(" (regexp-opt '("input" "interface")) "\\)"
               "[[:space:]]+\\(\\w+\\)")
      (1 font-lock-keyword-face)
      (2 font-lock-function-name-face))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]