File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,16 @@ The slash is expected at the end."
5151Use https://download.eclipse.org/jdtls/milestones/1.12.0/jdt-language-server-1.12.0-202206011637.tar.gz if you want to use older java version."
5252 :type 'string )
5353
54+ (defcustom lsp-java-server-config-dir nil
55+ " Path to your platform's configuration directory.
56+
57+ This path has to be writable. This configuration is specifically
58+ created for systems like NixOS where the default configuration
59+ directory inferred by lsp-java is not writable."
60+ :group 'lsp-java
61+ :risky t
62+ :type 'directory )
63+
5464(defcustom lsp-java-java-path " java"
5565 " Path of the java executable."
5666 :type 'string )
@@ -641,7 +651,9 @@ FULL specify whether full or incremental build will be performed."
641651(defun lsp-java--ls-command ()
642652 " LS startup command."
643653 (let ((server-jar (lsp-file-local-name (lsp-java--locate-server-jar)))
644- (server-config (lsp-file-local-name (lsp-java--locate-server-config)))
654+ (server-config (if lsp-java-server-config-dir
655+ lsp-java-server-config-dir
656+ (lsp-file-local-name (lsp-java--locate-server-config))))
645657 (java-9-args (when (lsp-java--java-9-plus-p)
646658 lsp-java-9-args)))
647659 (lsp-java--ensure-dir lsp-java-workspace-dir)
You can’t perform that action at this time.
0 commit comments