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

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

[nongnu] elpa/graphql-mode 5bd8b6273e 003/122: fontify more graphql cons


From: ELPA Syncer
Subject: [nongnu] elpa/graphql-mode 5bd8b6273e 003/122: fontify more graphql constructions
Date: Sat, 29 Jan 2022 08:03:25 -0500 (EST)

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

    fontify more graphql constructions
---
 graphql.el | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/graphql.el b/graphql.el
index d3ace6f844..c1a53f5339 100644
--- a/graphql.el
+++ b/graphql.el
@@ -34,12 +34,24 @@
     st))
 
 (defvar graphql-font-lock-keywords
-  (list (regexp-opt (list "type" "fragment"))
+  (list
+   ;; Keywords
+   (regexp-opt (list "type" "fragment" "interface" "union"))
 
-        (cons (regexp-opt (list "true" "false" "null"))
-              'font-lock-constant-face)
+   ;; Constants
+   (cons (regexp-opt (list "true" "false" "null"))
+         'font-lock-constant-face)
+
+   ;; Built-in scalar types
+   (cons (regexp-opt (list "Int" "Float" "String" "Boolean" "ID"))
+         'font-lock-type-face)
+
+   ;; Directives
+   '("@\\w+" . font-lock-keyword-face)
+
+   ;; Variables
+   '("\\$\\w+" . font-lock-variable-name-face)))
 
-        '("\\$\\w+" . font-lock-variable-name-face)))
 
 (define-derived-mode graphql-mode prog-mode "GraphQL"
   ""



reply via email to

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