Add module-processing

This commit is contained in:
Henrik Lissner 2016-04-09 02:49:54 -04:00
parent 2ae9b155ad
commit 7047fb78e3
4 changed files with 50 additions and 0 deletions

3
Cask
View file

@ -179,6 +179,9 @@
(depends-on "php-boris") (depends-on "php-boris")
(depends-on "php-extras") (depends-on "php-extras")
;; Processing -- modules/module-processing.el
(depends-on "processing-mode")
;; Python -- modules/module-python.el ;; Python -- modules/module-python.el
(depends-on "nose") (depends-on "nose")
(depends-on "anaconda-mode") (depends-on "anaconda-mode")

View file

@ -46,6 +46,7 @@
;; Emacs ;; Emacs
("^\\*.+-Profiler-Report .+\\*$" :regexp t :align below :size 0.3) ("^\\*.+-Profiler-Report .+\\*$" :regexp t :align below :size 0.3)
("*processing-compilation*" :align below :size 15 :noselect t)
("*Backtrace*" :align below :size 0.25 :noselect t) ("*Backtrace*" :align below :size 0.25 :noselect t)
("*scratch*" :align below :size 0.3 :select t) ("*scratch*" :align below :size 0.3 :select t)
("*Help*" :align below :size 21 :select t) ("*Help*" :align below :size 21 :select t)

View file

@ -76,6 +76,7 @@
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
module-processing ; pretty prototypes
module-python ; beautiful is better than ugly module-python ; beautiful is better than ugly
module-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"} module-ruby ; 1.step do {|i| p "Ruby is #{i&1==0?'love':'life'}"}
module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() module-rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()

View file

@ -0,0 +1,45 @@
;;; module-processing.el
(use-package processing-mode
:when IS-MAC
:commands (processing-mode processing-find-sketch)
:mode "\\.pde$"
:config
(setq processing-location "/usr/local/bin/processing-java"
processing-application-dir "/Applications/Processing.app"
processing-sketchbook-dir "~/Dropbox/work/pde"
processing-output-dir "/tmp")
(define-builder! processing-mode processing-sketch-build)
(after! quickrun
(quickrun-add-command
"processing" `((:command . ,processing-location)
(:exec . (lambda () (format "--sketch=%s --output=%s --force --run"
(narf/project-root) processing-output-dir)))
(:description . "Run Processing sketch"))
:mode 'processing-mode))
(map! :map processing-mode-map
:nv "M-r" 'processing-sketch-run
:m "gD" 'processing-find-in-reference
:m "gF" 'processing-find-sketch
(:localleader
"e" 'processing-export-application
"h" 'processing-open-reference
"e" 'processing-open-examples
"o" 'processing-open-sketchbook))
(add-hook 'processing-compilation-mode-hook 'narf|hide-mode-line)
(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