Skip to content

Commit

Permalink
Configure Java VM to tune its behaviour or support particular libraries.
Browse files Browse the repository at this point in the history
* eglot.el (eglot-eclipse-jdt-vmargs): New defcustom.
(eglot-eclipse-jdt): Apply VM arguments in eglot-eclipse-jdt-vmargs.
  • Loading branch information
zbelial committed Jan 15, 2022
1 parent b928aba commit 9376227
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -3005,6 +3005,14 @@ If NOERROR, return predicate, else erroring function."

;;; eclipse-jdt-specific
;;;
(defcustom eglot-eclipse-jdt-vmargs '()
"Configure Java VM to tune its behaviour or support particular libraries.
For example, if you are a Lombok user, you can specify the argument needed here.
You can also specify some arguments to reduce memory consumption,
see https://github.com/redhat-developer/vscode-java/pull/1262 for more details.
"

This comment has been minimized.

Copy link
@skangas

skangas Jan 15, 2022

Collaborator

Please put the " on the previous line.

:type '(repeat string))

(defclass eglot-eclipse-jdt (eglot-lsp-server) ()
:documentation "Eclipse's Java Development Tools Language Server.")

Expand Down Expand Up @@ -3083,13 +3091,14 @@ If INTERACTIVE, prompt user for details."
(unless (file-directory-p workspace)
(make-directory workspace t))
(cons 'eglot-eclipse-jdt
(list (executable-find "java")
"-Declipse.application=org.eclipse.jdt.ls.core.id1"
"-Dosgi.bundles.defaultStartLevel=4"
"-Declipse.product=org.eclipse.jdt.ls.core.product"
"-jar" jar
"-configuration" config
"-data" workspace)))))
`(,(executable-find "java")
"-Declipse.application=org.eclipse.jdt.ls.core.id1"
"-Dosgi.bundles.defaultStartLevel=4"
"-Declipse.product=org.eclipse.jdt.ls.core.product"
,@eglot-eclipse-jdt-vmargs
"-jar" ,jar
"-configuration" ,config
"-data" ,workspace)))))

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

0 comments on commit 9376227

Please sign in to comment.