2017-06-08 11:47:56 +02:00
|
|
|
;;; lang/julia/config.el -*- lexical-binding: t; -*-
|
2016-04-12 15:33:06 -04:00
|
|
|
|
|
|
|
(use-package julia-mode
|
|
|
|
:interpreter "julia"
|
2016-05-24 22:09:50 -04:00
|
|
|
:config
|
2018-06-15 16:07:24 +02:00
|
|
|
(set-repl-handler! 'julia-mode #'+julia/repl)
|
2017-04-26 23:29:31 -04:00
|
|
|
|
|
|
|
;; Borrow matlab.el's fontification of math operators
|
|
|
|
;; From <https://ogbe.net/emacsconfig.html>
|
2019-02-15 19:42:36 -05:00
|
|
|
(dolist (mode '(julia-mode ess-julia-mode))
|
|
|
|
(font-lock-add-keywords
|
|
|
|
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)))))
|