Add julia-mode

This commit is contained in:
Henrik Lissner 2016-04-12 15:33:06 -04:00
parent 54dcb9fd44
commit adbd4eecd0
4 changed files with 31 additions and 0 deletions

3
Cask
View file

@ -167,6 +167,9 @@
(depends-on "company-tern") (depends-on "company-tern")
(depends-on "nodejs-repl") (depends-on "nodejs-repl")
;; Julia -- modules/module-julia.el
(depends-on "julia-mode")
;; Lisp -- modules/module-lisp.el ;; Lisp -- modules/module-lisp.el
(depends-on "slime") (depends-on "slime")

View file

@ -73,6 +73,7 @@
module-haskell ; a language that's lazier than I am module-haskell ; a language that's lazier than I am
module-java ; the poster child for carpal tunnel syndome module-java ; the poster child for carpal tunnel syndome
module-js ; all(hope(abandon(ye(who(enter(here)))))) module-js ; all(hope(abandon(ye(who(enter(here))))))
module-julia ; MATLAB, but fast
module-lisp ; drowning in parentheses module-lisp ; drowning in parentheses
module-lua ; one-based indices? one-based indices. module-lua ; one-based indices? one-based indices.
module-php ; making php less painful to work with module-php ; making php less painful to work with

View file

@ -0,0 +1,15 @@
;;; defuns-julia.el
;;;###autoload
(defun narf/julia-repl ()
"Run an inferior instance of `julia' inside Emacs."
(interactive)
(let ((buffer (get-buffer-create "*Julia*")))
(unless (comint-check-proc "*Julia*")
(apply #'make-comint-in-buffer "Julia" "*Julia*" julia-program julia-arguments))
(pop-to-buffer buffer)
(with-current-buffer buffer
(inferior-julia-mode))))
(provide 'defuns-julia)
;;; defuns-julia.el ends here

12
modules/module-julia.el Normal file
View file

@ -0,0 +1,12 @@
;;; module-julia.el
(use-package julia-mode
:mode "\\.jl$"
:interpreter "julia"
:init
(define-repl! julia-mode narf/julia-repl)
(evil-set-initial-state 'inferior-julia-mode 'emacs)
(add-to-list 'editorconfig-indentation-alist '(julia-mode julia-indent-offset)))
(provide 'module-julia)
;;; module-julia.el ends here