2016-04-09 02:49:54 -04:00
|
|
|
;;; module-processing.el
|
|
|
|
|
|
|
|
(use-package processing-mode
|
|
|
|
:when IS-MAC
|
|
|
|
:commands (processing-mode processing-find-sketch)
|
|
|
|
:mode "\\.pde$"
|
2016-04-20 21:36:32 -04:00
|
|
|
:init
|
2016-05-20 22:37:30 -04:00
|
|
|
(add-hook 'processing-compilation-mode-hook 'doom|hide-mode-line)
|
2016-04-20 21:36:32 -04:00
|
|
|
|
2016-04-09 02:49:54 -04:00
|
|
|
:config
|
2016-05-01 01:10:30 -04:00
|
|
|
(def-builder! processing-mode processing-sketch-build)
|
2016-05-24 22:09:50 -04:00
|
|
|
(def-docset! processing-mode ("Processing"))
|
2016-05-24 21:57:25 -04:00
|
|
|
(def-popup! "*processing-compilation*" :align below :size 10 :noselect t)
|
2016-04-09 02:49:54 -04:00
|
|
|
(setq processing-location "/usr/local/bin/processing-java"
|
|
|
|
processing-application-dir "/Applications/Processing.app"
|
|
|
|
processing-sketchbook-dir "~/Dropbox/work/pde"
|
|
|
|
processing-output-dir "/tmp")
|
|
|
|
|
|
|
|
(map! :map processing-mode-map
|
|
|
|
:nv "M-r" 'processing-sketch-run
|
2016-04-20 21:36:32 -04:00
|
|
|
:m "gd" 'processing-find-in-reference
|
2016-04-09 02:49:54 -04:00
|
|
|
:m "gF" 'processing-find-sketch
|
|
|
|
(:localleader
|
|
|
|
"e" 'processing-export-application
|
|
|
|
"h" 'processing-open-reference
|
|
|
|
"e" 'processing-open-examples
|
|
|
|
"o" 'processing-open-sketchbook))
|
|
|
|
|
2016-04-23 22:08:46 -04:00
|
|
|
(after! quickrun
|
|
|
|
(quickrun-add-command
|
|
|
|
"processing" `((:command . ,processing-location)
|
|
|
|
(:exec . (lambda () (format "--sketch=%s --output=%s --force --run"
|
2016-05-20 22:37:30 -04:00
|
|
|
(doom/project-root) processing-output-dir)))
|
2016-04-23 22:08:46 -04:00
|
|
|
(:description . "Run Processing sketch"))
|
|
|
|
:mode 'processing-mode))
|
|
|
|
|
2016-04-09 02:49:54 -04:00
|
|
|
(add-hook! processing-mode
|
|
|
|
(setq-local company-backends '((company-keywords
|
|
|
|
:with
|
|
|
|
company-yasnippet
|
|
|
|
company-dabbrev-code)))
|
|
|
|
(make-local-variable 'company-keywords-alist)
|
|
|
|
(add-to-list 'company-keywords-alist
|
|
|
|
(cons 'processing-mode (append processing-functions
|
|
|
|
processing-builtins
|
|
|
|
processing-constants)))))
|
|
|
|
|
|
|
|
(provide 'module-processing)
|
|
|
|
;;; module-processing.el ends here
|