From ba82b2a87d61b0440688c235883b307efd3409ff Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 28 May 2019 07:57:27 -0700 Subject: [PATCH] =?UTF-8?q?Move=20the=20=E2=80=98lsp-java=E2=80=99=20data?= =?UTF-8?q?=20to=20a=20better=20location?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oni-java.el | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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)