Emacs development environment configuration (3) — java development environment

Time:2021-8-2

1、 Reference

Emacs series article directory – updating

Java Programming in Emacs

2、 Environment installation

2.1 dependent installation

Software explain
Java
maven

2.2 installationLSP

2.3 installing plug-inslsp-mode

M-x package-install [RET] lsp-java [RET]

#Create Maven project

mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false

IIIlspuse

3.1 characteristics

characteristic explain
Syntax check flycheck/lsp-ui
Code completion, auto fill company-capf, complete-at-point
Javadoc hoversDocument description lsp-ui
Code actionsCode operation lsp-ui
Code outlineCode outline imenu
Code navigationCode navigation xref
Code lens (references/implementations) xref
HighlightsHighlight
Code formattingformat
Maven pom.xml project supportsupportmavenproject
Limited Gradle supportsupportgradleproject
Visual debuggerVisual debugging dap-mode
Test runnerRun test dap-mode
Project explorer integration treemacs
Integration with Spring Initializr