Add Groovy REPL support
This commit is contained in:
parent
b5c4fce0b1
commit
3e7624cfc0
2 changed files with 8 additions and 1 deletions
|
@ -71,3 +71,9 @@ root)."
|
||||||
(user-error "This buffer has no filepath; cannot guess its class name"))
|
(user-error "This buffer has no filepath; cannot guess its class name"))
|
||||||
(or (file-name-sans-extension (file-name-base (buffer-file-name)))
|
(or (file-name-sans-extension (file-name-base (buffer-file-name)))
|
||||||
"ClassName"))
|
"ClassName"))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +java/groovy-open-repl ()
|
||||||
|
(interactive)
|
||||||
|
(call-interactively #'run-groovy)
|
||||||
|
(pop-to-buffer groovy-buffer))
|
||||||
|
|
|
@ -45,4 +45,5 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
|
||||||
(use-package! groovy-mode
|
(use-package! groovy-mode
|
||||||
:mode "\\.g\\(?:radle\\|roovy\\)$"
|
:mode "\\.g\\(?:radle\\|roovy\\)$"
|
||||||
:config
|
:config
|
||||||
(set-eval-handler! 'groovy-mode "groovy"))
|
(set-eval-handler! 'groovy-mode "groovy")
|
||||||
|
(set-repl-handler! 'groovy-mode #'+java/groovy-open-repl))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue