lang/java: remove redundant server-install code + minor refactor

meghanada-mode already auto-installs the server. It doesn't need our
help.
This commit is contained in:
Henrik Lissner 2017-12-22 15:17:03 -05:00
parent e9f34d8bdb
commit a74218f490
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 4 additions and 9 deletions

View file

@ -10,19 +10,12 @@
meghanada-use-eldoc t
meghanada-use-auto-start t)
(add-hook 'java-mode-hook #'rainbow-delimiters-mode)
;; Setup on first use
(unless (bound-and-true-p byte-compile-current-file)
(meghanada-install-server)
(if (file-exists-p (meghanada--locate-server-jar))
(add-hook! 'meghanada-mode-hook #'(flycheck-mode eldoc-mode))
(warn "java-mode: meghanada-server not installed, java-mode will run with reduced functionality")))
(set! :jump 'java-mode
:definition #'meghanada-jump-declaration
:references #'meghanada-reference)
(add-hook! 'meghanada-mode-hook #'(flycheck-mode eldoc-mode))
;;
(def-menu! +java/refactor-menu
"Refactoring commands for `java-mode' buffers."

View file

@ -1,5 +1,7 @@
;;; lang/java/config.el -*- lexical-binding: t; -*-
(add-hook 'java-mode-hook #'rainbow-delimiters-mode)
(cond ((featurep! +meghanada) (load! +meghanada))
((featurep! +eclim) ; FIXME lang/java +eclim
;;(load! +eclim)