Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More customizable eclipse jdt configuration #242

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -2422,6 +2422,14 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp."

;;; eclipse-jdt-specific
;;;
(defcustom eglot-eclipse-jdt-config-dir nil
"Path of eclipse jdt configuration files."
:type 'string)

(defcustom eglot-eclipse-jdt-java-home nil
"Java version to be used for starting eclipse jdt ls."
:type 'string)

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

Expand Down Expand Up @@ -2480,7 +2488,7 @@ If INTERACTIVE, prompt user for details."
(repodir (if (file-directory-p repodir) repodir dir))
(config
(concat
repodir
(or (if eglot-eclipse-jdt-config-dir (expand-file-name eglot-eclipse-jdt-config-dir)) repodir)
(cond
((string= system-type "darwin") "config_mac")
((string= system-type "windows-nt") "config_win")
Expand All @@ -2503,7 +2511,7 @@ If INTERACTIVE, prompt user for details."
(unless (file-directory-p workspace)
(make-directory workspace t))
(cons 'eglot-eclipse-jdt
(list (executable-find "java")
(list (if eglot-eclipse-jdt-java-home (concat (expand-file-name eglot-eclipse-jdt-java-home) "/bin/java") (executable-find "java"))
"-Declipse.application=org.eclipse.jdt.ls.core.id1"
"-Dosgi.bundles.defaultStartLevel=4"
"-Declipse.product=org.eclipse.jdt.ls.core.product"
Expand Down