1
0
Fork 0

Add lsp-mode to Java config and stop using JDEE

This commit is contained in:
Tom Willemse 2019-04-22 01:00:53 -07:00
parent 860cb9b58e
commit 61e7180311

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 20190306003041
;; Package-Requires: (jdee oni-fci)
;; Version: 20190421175627
;; Package-Requires: (oni-fci lsp-java company-lsp lsp-ui)
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@ -26,13 +26,19 @@
;;; Code:
(require 'jdee)
(with-eval-after-load 'lsp (require 'lsp-java))
(defun oni-java-enable-buffer-formatting ()
"Format the buffer before save."
(add-hook 'before-save-hook 'lsp-format-buffer nil :local))
(add-hook 'java-mode-hook 'electric-pair-local-mode)
(add-hook 'java-mode-hook 'electric-indent-local-mode)
(add-hook 'java-mode-hook 'fci-mode)
(add-hook 'java-mode-hook 'lsp)
(add-hook 'java-mode-hook 'oni-java-enable-buffer-formatting)
(setq jdee-server-dir "~/usr/share/java/jdee/")
(add-to-list 'company-backends 'company-lsp)
;;;###autoload(with-eval-after-load 'cc-mode (require 'oni-java))