38 lines
1.3 KiB
EmacsLisp
38 lines
1.3 KiB
EmacsLisp
;;; Directory Local Variables -*- no-byte-compile: t -*-
|
|
|
|
((clojure-mode
|
|
. ((cider-clojure-cli-parameters . "-M:common:dev")
|
|
(cider-inject-dependencies-at-jack-in . nil)
|
|
(eval
|
|
. (progn
|
|
(unless (fboundp 'clj-watch)
|
|
(load (expand-file-name
|
|
"watch.el"
|
|
(locate-dominating-file default-directory ".dir-locals.el"))))
|
|
|
|
(defun clj-game-run-main ()
|
|
"Send (future (-main)) to the REPL."
|
|
(interactive)
|
|
(cider-interactive-eval "(future (-main))"))
|
|
|
|
(defun clj-game-clear-error ()
|
|
"Resume the game loop after an error froze it."
|
|
(interactive)
|
|
(cider-interactive-eval "(engine/clear-error!)"))
|
|
|
|
(unless (boundp 'clj-game-mode-map)
|
|
(defvar clj-game-mode-map
|
|
(let ((m (make-sparse-keymap)))
|
|
(define-key m (kbd "C-c C-w") #'clj-watch)
|
|
(define-key m (kbd "C-c C-M-r") #'clj-game-run-main)
|
|
(define-key m (kbd "C-c C-M-e") #'clj-game-clear-error)
|
|
m)))
|
|
|
|
(unless (fboundp 'clj-game-mode)
|
|
(define-minor-mode clj-game-mode
|
|
"Project keybindings for a clojure/raylib game."
|
|
:lighter " Game"
|
|
:keymap clj-game-mode-map))
|
|
|
|
(clj-game-mode 1))))))
|