doomemacs/modules/lang/julia/config.el

31 lines
976 B
EmacsLisp
Raw Normal View History

;;; lang/julia/config.el -*- lexical-binding: t; -*-
2016-04-13 03:33:06 +08:00
(use-package julia-mode
:interpreter "julia"
2016-05-25 10:09:50 +08:00
:config
(set! :repl 'julia-mode #'+julia/repl)
;; Borrow matlab.el's fontification of math operators
;; From <https://ogbe.net/emacsconfig.html>
(font-lock-add-keywords
'julia-mode
`((,(let ((OR "\\|"))
(concat "\\(" ;; stolen `matlab.el' operators first
"[<>!]=?" OR
"\\.[/*^']" OR
"==" OR
"=>" OR
"\\<xor\\>" OR
"[-+*\\/^&|$]=?" OR ;; this has to come before next (updating operators)
"[-!^&|*+\\/~:]" OR
;; more extra julia operators follow
"[%$]" OR
;; bitwise operators
">>>" OR ">>" OR "<<" OR
">>>=" OR ">>" OR "<<" OR
;; comparison
"[<>!]=?" OR
"\\)"))
1 font-lock-type-face))))
2016-04-13 03:33:06 +08:00