Add lsp-mode to Java config and stop using JDEE
This commit is contained in:
parent
860cb9b58e
commit
61e7180311
1 changed files with 10 additions and 4 deletions
14
oni-java.el
14
oni-java.el
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue