branch: elpa/graphql-mode
commit bf0412def0dc8909367a2ebe2ed5b5b648599a73
Author: David Vazquez Pua <[email protected]>
Commit: David Vazquez Pua <[email protected]>
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))