diff --git a/oni-java.el b/oni-java.el index ec5ed7e..319b2a2 100644 --- a/oni-java.el +++ b/oni-java.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; 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)