2015-05-20 21:06:46 +00:00
|
|
|
;;; packages.el --- Java Layer packages File for Spacemacs
|
|
|
|
;;
|
|
|
|
;; Copyright (c) 2015 Lukasz Klich
|
|
|
|
;;
|
|
|
|
;; Author: Lukasz Klich <klich.lukasz@gmail.com>
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
(defvar java-packages
|
|
|
|
'(
|
|
|
|
emacs-eclim
|
|
|
|
company
|
|
|
|
))
|
|
|
|
|
|
|
|
(defun java/init-emacs-eclim ()
|
|
|
|
(use-package eclim
|
2015-07-04 04:20:12 +00:00
|
|
|
:defer t
|
2015-08-11 17:15:25 +00:00
|
|
|
:diminish eclim-mode
|
2015-07-04 04:20:12 +00:00
|
|
|
:init (add-hook 'java-mode-hook 'eclim-mode)
|
2015-05-20 21:06:46 +00:00
|
|
|
:config
|
|
|
|
(progn
|
2015-07-04 04:20:12 +00:00
|
|
|
(setq help-at-pt-display-when-idle t
|
|
|
|
help-at-pt-timer-delay 0.1)
|
2015-05-20 21:06:46 +00:00
|
|
|
(help-at-pt-set-timer)
|
|
|
|
|
|
|
|
(add-to-list 'minor-mode-alist
|
2015-07-04 04:20:12 +00:00
|
|
|
'(eclim-mode (:eval (eclim-modeline-string))))
|
2015-05-20 21:06:46 +00:00
|
|
|
|
|
|
|
(evil-define-key 'insert java-mode-map
|
2015-07-04 04:29:25 +00:00
|
|
|
(kbd ".") 'spacemacs/java-completing-dot
|
2015-07-19 09:50:50 +00:00
|
|
|
(kbd ":") 'spacemacs/java-completing-double-colon
|
2015-05-20 21:06:46 +00:00
|
|
|
(kbd "M-.") 'eclim-java-find-declaration
|
|
|
|
(kbd "M-,") 'pop-tag-mark
|
|
|
|
(kbd "M-<mouse-3>") 'eclim-java-find-declaration
|
|
|
|
(kbd "<mouse-8>") 'pop-tag-mark)
|
|
|
|
|
|
|
|
(evil-define-key 'normal java-mode-map
|
|
|
|
(kbd "M-.") 'eclim-java-find-declaration
|
|
|
|
(kbd "M-,") 'pop-tag-mark
|
|
|
|
(kbd "M-<mouse-3>") 'eclim-java-find-declaration
|
|
|
|
(kbd "<mouse-8>") 'pop-tag-mark)
|
|
|
|
|
|
|
|
(evil-define-key 'normal eclim-problems-mode-map
|
|
|
|
(kbd "a") 'eclim-problems-show-all
|
|
|
|
(kbd "e") 'eclim-problems-show-errors
|
|
|
|
(kbd "g") 'eclim-problems-buffer-refresh
|
|
|
|
(kbd "q") 'eclim-quit-window
|
|
|
|
(kbd "w") 'eclim-problems-show-warnings
|
|
|
|
(kbd "f") 'eclim-problems-toggle-filefilter
|
|
|
|
(kbd "c") 'eclim-problems-correct
|
|
|
|
(kbd "RET") 'eclim-problems-open-current)
|
|
|
|
|
|
|
|
(evil-define-key 'normal eclim-project-mode-map
|
|
|
|
(kbd "N") 'eclim-project-create
|
|
|
|
(kbd "m") 'eclim-project-mark-current
|
|
|
|
(kbd "M") 'eclim-project-mark-all
|
|
|
|
(kbd "u") 'eclim-project-unmark-current
|
|
|
|
(kbd "U") 'eclim-project-unmark-all
|
|
|
|
(kbd "o") 'eclim-project-open
|
|
|
|
(kbd "c") 'eclim-project-close
|
|
|
|
(kbd "i") 'eclim-project-info-mode
|
|
|
|
(kbd "I") 'eclim-project-import
|
|
|
|
(kbd "RET") 'eclim-project-goto
|
|
|
|
(kbd "D") 'eclim-project-delete
|
|
|
|
(kbd "p") 'eclim-project-update
|
|
|
|
(kbd "g") 'eclim-project-mode-refresh
|
|
|
|
(kbd "R") 'eclim-project-rename
|
|
|
|
(kbd "q") 'eclim-quit-window)
|
|
|
|
|
|
|
|
(evil-leader/set-key-for-mode 'java-mode
|
|
|
|
"mea" 'eclim-problems-show-all
|
2015-07-04 04:20:12 +00:00
|
|
|
"meb" 'eclim-problems
|
|
|
|
"mec" 'eclim-problems-correct
|
2015-05-20 21:06:46 +00:00
|
|
|
"mee" 'eclim-problems-show-errors
|
|
|
|
"mef" 'eclim-problems-toggle-filefilter
|
|
|
|
"men" 'eclim-problems-next-same-window
|
2015-07-04 04:20:12 +00:00
|
|
|
"meo" 'eclim-problems-open
|
2015-05-20 21:06:46 +00:00
|
|
|
"mep" 'eclim-problems-previous-same-window
|
2015-07-04 04:20:12 +00:00
|
|
|
"mew" 'eclim-problems-show-warnings
|
2015-05-20 21:06:46 +00:00
|
|
|
|
2015-07-04 04:55:38 +00:00
|
|
|
"mff" 'eclim-java-find-generic
|
|
|
|
|
2015-05-20 21:06:46 +00:00
|
|
|
"mgg" 'eclim-java-find-declaration
|
|
|
|
"mgt" 'eclim-java-find-type
|
|
|
|
|
2015-07-04 04:20:12 +00:00
|
|
|
"mrc" 'eclim-java-constructor
|
|
|
|
"mrg" 'eclim-java-generate-getter-and-setter
|
2015-05-20 21:06:46 +00:00
|
|
|
"mrf" 'eclim-java-format
|
|
|
|
"mri" 'eclim-java-import-organize
|
|
|
|
"mrj" 'eclim-java-implement
|
2015-07-04 04:20:12 +00:00
|
|
|
"mrr" 'eclim-java-refactor-rename-symbol-at-point
|
2015-05-20 21:06:46 +00:00
|
|
|
|
|
|
|
"mhc" 'eclim-java-call-hierarchy
|
2015-07-04 04:20:12 +00:00
|
|
|
"mhh" 'eclim-java-show-documentation-for-current-element
|
2015-05-20 21:06:46 +00:00
|
|
|
"mhi" 'eclim-java-hierarchy
|
2015-07-04 04:20:12 +00:00
|
|
|
"mhu" 'eclim-java-find-references
|
2015-05-20 21:06:46 +00:00
|
|
|
|
2015-07-04 04:29:25 +00:00
|
|
|
"mmi" 'spacemacs/java-maven-clean-install
|
|
|
|
"mmI" 'spacemacs/java-maven-install
|
2015-05-20 21:06:46 +00:00
|
|
|
"mmp" 'eclim-maven-lifecycle-phases
|
|
|
|
"mmr" 'eclim-maven-run
|
2015-07-04 04:20:12 +00:00
|
|
|
"mmR" 'eclim-maven-lifecycle-phase-run
|
2015-07-04 04:29:25 +00:00
|
|
|
"mmt" 'spacemacs/java-maven-test
|
2015-05-20 21:06:46 +00:00
|
|
|
|
|
|
|
"maa" 'eclim-ant-run
|
2015-07-04 04:20:12 +00:00
|
|
|
"mac" 'eclim-ant-clear-cache
|
2015-05-20 21:06:46 +00:00
|
|
|
"mar" 'eclim-ant-run
|
|
|
|
"mav" 'eclim-ant-validate
|
|
|
|
|
|
|
|
"mpb" 'eclim-project-build
|
2015-07-04 04:20:12 +00:00
|
|
|
"mpc" 'eclim-project-create
|
2015-05-20 21:06:46 +00:00
|
|
|
"mpd" 'eclim-project-delete
|
|
|
|
"mpg" 'eclim-project-goto
|
|
|
|
"mpi" 'eclim-project-import
|
2015-07-04 04:20:12 +00:00
|
|
|
"mpj" 'eclim-project-info-mode
|
2015-05-20 21:06:46 +00:00
|
|
|
"mpk" 'eclim-project-close
|
2015-07-04 04:20:12 +00:00
|
|
|
"mpo" 'eclim-project-open
|
2015-05-20 21:06:46 +00:00
|
|
|
"mpp" 'eclim-project-mode
|
|
|
|
"mpu" 'eclim-project-update
|
|
|
|
|
2015-07-04 04:29:25 +00:00
|
|
|
"mtt" 'eclim-run-junit)))
|
2015-05-20 21:06:46 +00:00
|
|
|
|
|
|
|
(use-package company-emacs-eclim
|
2015-07-04 04:24:44 +00:00
|
|
|
:if (configuration-layer/package-usedp 'company)
|
|
|
|
:defer t
|
|
|
|
:init
|
2015-07-04 04:58:42 +00:00
|
|
|
(push 'company-emacs-eclim company-backends-java-mode)))
|
2015-05-20 21:06:46 +00:00
|
|
|
|
|
|
|
(defun java/post-init-company ()
|
|
|
|
(spacemacs|add-company-hook java-mode))
|