Not sure if and when I will get back to doing Java development (so many more interesting languages), but I started my Java career with Emacs…
The high school students that I mentor use Eclipse, and the default style for it is Tabs, so I make an exception to my normal rule:
(use-package java-mode
:init (add-hook 'java-mode-hook (lambda ()
(setq c-basic-offset 4
tab-width 4
indent-tabs-mode t))))
Hook up the smartparens to Java:
(use-package smartparens
:ensure t
:init (add-hook 'java-mode-hook 'smartparens-mode))
A nice collection of stealable Java snippets:
(use-package java-snippets
:ensure t)
Enhanced Tags functionality for Java:
(use-package jtags
:ensure t
:init (add-hook 'java-mode-hook 'jtags-mode))
If Eclim isn’t complete enough, I may want to think about:
- Turn on semantic mode for Java source code
- Deal with Java Imports using this package
- Run java, and then use JDB to connect:
java -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
Allowing us to easily load these settings:
(provide 'init-java)
Before you can build this on a new system, make sure that you put
the cursor over any of these properties, and hit: C-c C-c