Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a06a04b90a
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (30 sloc) 1.679 kb
;; This is an absolute, minimal, better-then-nothing mode for joxa. At
;; some point we will build something better.
(define-derived-mode joxa-mode lisp-mode "Joxa Editing Mode" "Major mode for editing Joxa files"
(font-lock-add-keywords 'joxa-mode
'(("module" . font-lock-keyword-face)
("deftype" . font-lock-keyword-face)
("defspec" . font-lock-keyword-face)
("definline" . font-lock-keyword-face)
("defmacro+" . font-lock-keyword-face)
("defmacro" . font-lock-keyword-face)
("defn+" . font-lock-keyword-face)
("defn" . font-lock-keyword-face)
("__try" . font-lock-keyword-face)
("use" . font-lock-keyword-face)
("ns" . font-lock-keyword-face)
("fn" . font-lock-keyword-face)))
(define-key joxa-mode-map "{" 'paredit-open-curly)
(define-key joxa-mode-map "}" 'paredit-close-curly)
(modify-syntax-entry ?< "(>" )
(modify-syntax-entry ?> ")<" )
(modify-syntax-entry ?[ "(]" )
(modify-syntax-entry ?] ")[" )
(modify-syntax-entry ?\{ "(}")
(modify-syntax-entry ?\} "){"))
;; Uncomment this if you want parenface and paredit (which you should)
;; (add-hook 'joxa-mode-hook '(lambda ()
;; (paredit-mode)
;; (require 'parenface)
;; (set-face-foreground 'paren-face "#073642")))
(add-to-list 'auto-mode-alist '("\\.jxa\\'" . joxa-mode))
Jump to Line
Something went wrong with that request. Please try again.