Skip to content

Commit a768583

Browse files
committed
Configure Java VM to tune its behaviour or support particular libraries.
* eglot.el (eglot-eclipse-jdt-vmargs): New defcustom. (eglot-eclipse-jdt): Apply VM arguments in eglot-eclipse-jdt-vmargs.
1 parent b928aba commit a768583

1 file changed

Lines changed: 15 additions & 7 deletions

File tree

eglot.el

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3005,6 +3005,13 @@ If NOERROR, return predicate, else erroring function."
30053005

30063006
;;; eclipse-jdt-specific
30073007
;;;
3008+
(defcustom eglot-eclipse-jdt-vmargs '()
3009+
"Configure Java VM to tune its behaviour or support particular libraries.
3010+
For example, if you are a Lombok user, you can specify the argument needed here.
3011+
You can also specify some arguments to reduce memory consumption,
3012+
see https://github.com/redhat-developer/vscode-java/pull/1262 for more details."
3013+
:type '(repeat string))
3014+
30083015
(defclass eglot-eclipse-jdt (eglot-lsp-server) ()
30093016
:documentation "Eclipse's Java Development Tools Language Server.")
30103017

@@ -3083,13 +3090,14 @@ If INTERACTIVE, prompt user for details."
30833090
(unless (file-directory-p workspace)
30843091
(make-directory workspace t))
30853092
(cons 'eglot-eclipse-jdt
3086-
(list (executable-find "java")
3087-
"-Declipse.application=org.eclipse.jdt.ls.core.id1"
3088-
"-Dosgi.bundles.defaultStartLevel=4"
3089-
"-Declipse.product=org.eclipse.jdt.ls.core.product"
3090-
"-jar" jar
3091-
"-configuration" config
3092-
"-data" workspace)))))
3093+
`(,(executable-find "java")
3094+
"-Declipse.application=org.eclipse.jdt.ls.core.id1"
3095+
"-Dosgi.bundles.defaultStartLevel=4"
3096+
"-Declipse.product=org.eclipse.jdt.ls.core.product"
3097+
,@eglot-eclipse-jdt-vmargs
3098+
"-jar" ,jar
3099+
"-configuration" ,config
3100+
"-data" ,workspace)))))
30933101

30943102
(cl-defmethod eglot-execute-command
30953103
((_server eglot-eclipse-jdt) (_cmd (eql java.apply.workspaceEdit)) arguments)

0 commit comments

Comments
 (0)