1
0
Fork 0

Move the ‘lsp-java’ data to a better location

This commit is contained in:
Tom Willemse 2019-05-28 07:57:27 -07:00
parent b3f2604de1
commit ba82b2a87d

View file

@ -4,8 +4,8 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 20190421175627
;; Package-Requires: (oni-fci lsp-java company-lsp lsp-ui)
;; Version: 20190528071542
;; Package-Requires: (oni-fci oni-data-dir 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,12 +26,22 @@
;;; Code:
(with-eval-after-load 'lsp (require 'lsp-java))
(require 'lsp-java)
(require 'oni-data-dir)
(defun oni-java-enable-buffer-formatting ()
"Format the buffer before save."
(add-hook 'before-save-hook 'lsp-format-buffer nil :local))
(setq lsp-java-server-install-dir
(oni-data-dir-locate "lsp-java/server/"))
(setq lsp-java-workspace-dir
(oni-data-dir-locate "lsp-java/workspace/"))
(setq lsp-java-workspace-cache-dir
(oni-data-dir-locate "lsp-java/workspace/cache/"))
(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)