You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java support for lsp-mode using the [Eclipse JDT Language Server](https://projects.eclipse.org/projects/eclipse.jdt.ls).
5
-
3
+
[](https://gitter.im/emacs-lsp/lsp-mode?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
+
Emacs Java IDE using [Eclipse JDT Language Server](https://projects.eclipse.org/projects/eclipse.jdt.ls).
6
5
## Features
7
6
LSP java mode supports the following JDT Features:
8
7
* As you type reporting of parsing and compilation errors (via [flycheck](https://github.com/flycheck/flycheck)/[lsp-ui](https://github.com/emacs-lsp/lsp-ui))
@@ -18,7 +17,9 @@ LSP java mode supports the following JDT Features:
* Test runner - [dap-mode](https://github.com/yyoncho/dap-mode/)
21
-
20
+
* Project explorer integration - [treemacs](https://github.com/Alexander-Miller/treemacs)
21
+
## Screenshot
22
+

22
23
## Installation
23
24
### Spacemacs
24
25
[lsp-java](https://github.com/emacs-lsp/lsp-java) is included in spacemacs (for now only on the dev branch). If you are using the development version of
@@ -35,14 +36,13 @@ Then add the following lines to your `.emacs` and open a file from the any of th
35
36
```emacs-lisp
36
37
(require 'lsp-java)
37
38
(add-hook 'java-mode-hook #'lsp-java-enable)
38
-
39
39
```
40
40
### [Eclipse JDT Language Server](https://projects.eclipse.org/projects/eclipse.jdt.ls)
41
41
42
42
[lsp-java](https://github.com/emacs-lsp/lsp-java) will automatically detect when the server is missing and it will download [Eclipse JDT Language Server](https://projects.eclipse.org/projects/eclipse.jdt.ls) before the first startup. The server installation will be in `lsp-java-server-install-dir`. It will detect whether [dap-mode](https://github.com/yyoncho/dap-mode/) is present and it will download the required server side plugins/components. If you want to update the server you can run `lsp-java-update-server`. To run specific version of [Eclipse JDT Language Server](https://projects.eclipse.org/projects/eclipse.jdt.ls) use `lsp-java-server-install-dir`.
43
43
44
-
####Quick start
45
-
Minimal configuration with [company-lsp](https://github.com/tigersoldier/company-lsp) and [lsp-ui](https://github.com/emacs-lsp/lsp-ui) and [dap-mode](https://github.com/yyoncho/dap-mode/). Make sure you have replaced the XXX placeholder with the list of the projects you want to import. Now you can explore the methods under `lsp-java-*`, `dap-java-*`, `dap-*`, and `lsp-*`
44
+
### Quick start
45
+
Minimal configuration with [company-lsp](https://github.com/tigersoldier/company-lsp) and [lsp-ui](https://github.com/emacs-lsp/lsp-ui) and [dap-mode](https://github.com/yyoncho/dap-mode/). Now you can explore the methods under `lsp-java-*`, `dap-java-*`, `dap-*`, and `lsp-*`
46
46
```elisp
47
47
(require 'cc-mode)
48
48
@@ -86,93 +86,85 @@ Minimal configuration with [company-lsp](https://github.com/tigersoldier/company
[lsp-java](https://github.com/emacs-lsp/lsp-java) provides integration with [treemacs](https://github.com/Alexander-Miller/treemacs) which provides option to navigate through package dependecies, namespaces, classes and resources.
[lsp-java](https://github.com/emacs-lsp/lsp-java) the command `lsp-java-browse-classpath` which allows users to browse the structure of current projects classpath. From that view the users could go to the particular item.
| lsp-java-vmargs | Specifies extra VM arguments used to launch the Java Language Server |
144
-
| lsp-java-incomplete-classpath | Specifies the severity of the message when the classpath is incomplete for a Java file |
145
-
| lsp-java-update-build-configuration | Specifies how modifications on build files update the Java classpath/configuration |
146
-
| lsp-java-import-exclusions | Configure glob patterns for excluding folders |
147
-
| lsp-java-favorite-static-members | Defines a list of static members or types with static members |
148
-
| lsp-java-import-order | Defines the sorting order of import statements |
149
-
| lsp-java-trace-server | Traces the communication between Emacs and the Java language server |
150
-
| lsp-java-enable-file-watch | Defines whether the client will monitor the files for changes |
151
-
| lsp-java-format-enabled | Specifies whether or not formatting is enabled on the language server |
152
-
| lsp-java-format-settings-url | Specifies the file path to the formatter xml url |
153
-
| lsp-java-format-settings-profile | Specifies the formatter profile name |
154
-
| lsp-java-format-comments-enabled | Preference key used to include the comments during the formatting |
155
-
| lsp-java-save-action-organize-imports | Organize imports on save |
156
-
| lsp-java-bundles | List of bundles that will be loaded in the JDT server |
157
-
| lsp-java-import-gradle-enabled | Enable/disable the Gradle importer |
158
-
| lsp-java-import-maven-enabled | Enable/disable the Maven importer |
159
-
| lsp-java-auto-build | Enable/disable the 'auto build' |
160
-
| lsp-java-progress-report |[Experimental] Enable/disable progress reports from background processes on the server |
161
-
| lsp-java-completion-guess-arguments | When set to true, method arguments are guessed when a method is selected from as list of code assist proposals. |
162
-
## Screenshot
163
-

134
+
*`lsp-java-server-install-dir` - Install directory for eclipsejdtls-server
135
+
*`lsp-java-java-path` - Path of the java executable
*`lsp-java-vmargs` - Specifies extra VM arguments used to launch the Java Language Server
139
+
*`lsp-java-incomplete-classpath` - Specifies the severity of the message when the classpath is incomplete for a Java file
140
+
*`lsp-java-update-build-configuration` - Specifies how modifications on build files update the Java classpath/configuration
141
+
*`lsp-java-import-exclusions` - Configure glob patterns for excluding folders
142
+
*`lsp-java-favorite-static-members` - Defines a list of static members or types with static members
143
+
*`lsp-java-import-order` - Defines the sorting order of import statements
144
+
*`lsp-java-trace-server` - Traces the communication between Emacs and the Java language server
145
+
*`lsp-java-enable-file-watch` - Defines whether the client will monitor the files for changes
146
+
*`lsp-java-format-enabled` - Specifies whether or not formatting is enabled on the language server
147
+
*`lsp-java-format-settings-url` - Specifies the file path to the formatter xml url
148
+
*`lsp-java-format-settings-profile` - Specifies the formatter profile name
149
+
*`lsp-java-format-comments-enabled` - Preference key used to include the comments during the formatting
150
+
*`lsp-java-save-action-organize-imports` - Organize imports on save
151
+
*`lsp-java-bundles` - List of bundles that will be loaded in the JDT server
152
+
*`lsp-java-import-gradle-enabled` - Enable/disable the Gradle importer
153
+
*`lsp-java-import-maven-enabled` - Enable/disable the Maven importer
154
+
*`lsp-java-auto-build` - Enable/disable the 'auto build'
155
+
*`lsp-java-progress-report` - [Experimental] Enable/disable progress reports from background processes on the server
156
+
*`lsp-java-completion-guess-arguments` - When set to true, method arguments are guessed when a method is selected from as list of code assist proposals.
164
157
## Additional packages
165
158
*[lsp-ui](https://github.com/emacs-lsp/lsp-ui) : Flycheck, documentation and code actions support.
166
159
*[company-lsp](https://github.com/tigersoldier/company-lsp) : LSP company backend.
0 commit comments