branch: elpa/julia-mode commit 5144c31dfdc9907dadf3ab0a6ecc818b8bd99843 Author: Wilfred Hughes <m...@wilfred.me.uk> Commit: Yichao Yu <yyc1...@gmail.com>
Highlight types in all type annotations. --- julia-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/julia-mode.el b/julia-mode.el index a6a3751..04735ba 100644 --- a/julia-mode.el +++ b/julia-mode.el @@ -85,6 +85,9 @@ (defconst julia-type-regex (rx symbol-start "type" (1+ space) (group (1+ (or word ?_))))) +(defconst julia-type-annotation-regex + (rx "::" (group (1+ (or word ?_))))) + (defconst julia-macro-regex "@\\w+") @@ -112,6 +115,7 @@ (list julia-forloop-in-regex 1 'font-lock-keyword-face) (list julia-function-regex 1 'font-lock-function-name-face) (list julia-type-regex 1 'font-lock-type-face) + (list julia-type-annotation-regex 1 'font-lock-type-face) )) (defconst julia-block-start-keywords