Skip to content

Commit db6539c

Browse files
authored
Add instructions to help/IDEs.txt for VSCode and Neovim (#14646)
Both of these use the eclipse language server, so they just leverage existing `gradlew eclipse`. The trick is to disable Eclipse Language Server's built-in gradle integration and just use the .classpath/.settings, otherwise chaos. The same general approach should work for other editors using the language server (Emacs, Helix, Zed, etc) too.
1 parent cae3cbc commit db6539c

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

help/IDEs.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,50 @@ File -> Import... -> Existing Project into Workspace
1818
Please note that Eclipse does not distinguish between sub-projects
1919
and package sets (main/ test) so pretty much all the sources and dependencies
2020
are available in one large bin.
21+
22+
23+
VSCode
24+
======
25+
26+
Run the following to set up Eclipse project files:
27+
28+
./gradlew eclipse
29+
30+
Open the lucene checkout in VSCode.
31+
32+
Install the recommended "Extension Pack for Java" if asked.
33+
34+
View -> Command Palette -> Preferences: Open Settings UI
35+
Type 'java.import.gradle.enabled' and uncheck it.
36+
Type 'java.import.maven.enabled' and uncheck it.
37+
38+
Restart VSCode.
39+
40+
41+
Neovim
42+
======
43+
44+
Run the following to set up Eclipse project files:
45+
46+
./gradlew eclipse
47+
48+
Install jdtls: https://projects.eclipse.org/projects/eclipse.jdt.ls
49+
Create lsp/jdtls.lua, see https://github.com/neovim/nvim-lspconfig for example.
50+
Modify lsp/jdtls.lua to disable gradle/maven integration:
51+
52+
init_options = {
53+
settings = {
54+
java = {
55+
import = {
56+
gradle = {
57+
enabled = false,
58+
},
59+
maven = {
60+
enabled = false,
61+
},
62+
},
63+
},
64+
},
65+
},
66+
67+
Enable 'jdtls' language server with vim.lsp.enable()

0 commit comments

Comments
 (0)