173

GitHub - emacs-lsp/lsp-java

 6 years ago
source link: https://github.com/emacs-lsp/lsp-java
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

MELPA

Java support for lsp-mode using the Eclipse JDT Language Server.

Installation

Clone this repository https://github.com/emacs-lsp/lsp-mode to a suitable path, and add

(add-to-list 'load-path "<path to lsp-java>")
(add-to-list 'load-path "<path to lsp-mode>")
(require 'lsp-java)
(require 'lsp-mode)
(add-hook 'java-mode-hook #'lsp-java-enable)

;; set the projects that are going to be imported into the workspace.
(setq lsp-java--workspace-folders (list "/path/to/project1"
                                        "/path/to/project2"
                                        ...))

to your .emacs.

It needs the eclipse jdt server in ~/.emacs.d/eclipse.jdt.ls/server/

Download either latest or a specific version of Eclipse JDT Language Server distribution to ~/.emacs.d/eclipse.jdt.ls/server/

If you choose to have the server installed in a different directory, set lsp-java-server-install-dir


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK