separate syntax highlighting for keywords and builtins
authorMike Shulman <shulman@sandiego.edu>
Thu, 7 Sep 2017 04:42:43 +0000 (21:42 -0700)
committerAnders Mörtberg <andersmortberg@gmail.com>
Tue, 12 Sep 2017 10:11:28 +0000 (12:11 +0200)
cubicaltt.el

index e1b6070edc0d58a71111d550137cbd9bc59db636..0b80db17bc69e8a590ade92ae489f205e0e79eed 100644 (file)
     "with" "module" "where" "U" "opaque" "transparent" "transparent_all")
   "Keywords for cubical.")
 
+(defvar cubicaltt-operations
+  '("PathP" "comp" "transport" "fill" "Glue" "glue" "unglue" "Id" "idC" "idJ")
+  "Operations for cubical.")
+
 (defvar cubicaltt-special
   '("undefined" "primitive")
   "Special operators for cubical.")
   (regexp-opt cubicaltt-keywords 'words)
   "Regexp that recognizes keywords for cubical.")
 
+(defvar cubicaltt-operations-regexp
+  (regexp-opt cubicaltt-operations 'words)
+  "Regexp that recognizes operations for cubical.")
+
 (defvar cubicaltt-operators-regexp
   (regexp-opt '(":" "->" "=" "|" "\\" "*" "_" "<" ">" "\\/" "/\\" "-" "@") t)
   "Regexp that recognizes operators for cubical.")
@@ -78,7 +86,8 @@
   "Regexp that recognizes the beginning of a cubical definition.")
 
 (defvar cubicaltt-font-lock-keywords
-  `((,cubicaltt-keywords-regexp . font-lock-type-face)
+  `((,cubicaltt-keywords-regexp . font-lock-keyword-face)
+    (,cubicaltt-operations-regexp . font-lock-builtin-face)
     (,cubicaltt-operators-regexp . font-lock-variable-name-face)
     (,cubicaltt-special-regexp . font-lock-warning-face)
     (,cubicaltt-def-regexp . font-lock-function-name-face))