You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by rm...@apache.org on 2025/07/01 14:49:21 UTC

(lucene) branch main updated: vscode: improve setup (#14883)

This is an automated email from the ASF dual-hosted git repository.

rmuir pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/main by this push:
     new f5c08ba6a4c vscode: improve setup (#14883)
f5c08ba6a4c is described below

commit f5c08ba6a4c2bdffa56c5bfdb7b062393b32d148
Author: Robert Muir <rm...@apache.org>
AuthorDate: Tue Jul 1 10:49:16 2025 -0400

    vscode: improve setup (#14883)
    
    specify extensions (redhat language server, editorconfig, ast-grep) to
    be recommended to the user so that the sources work correctly.
    
    disable automatic gradle/maven importing: causes false errors and we
    configure this via `gradle eclipse`
    
    disable the default lombok support: it isn't used by the project and
    causes false compiler errors in some large sources such as
    HTMLStripCharFilter.
    
    disable the default prompt for null analysis, we don't want this:
    we configure such things via `gradle eclipse` exactly the way we want.
    
    put an upperbound on completions: otherwise eclipse jdt.ls can be
    overwhelmed.
    
    configure ast-grep for our non-standard configuration path. This way it
    works out of box if user tries to add wildcard import, @author tag,
    TOOD, etc.
---
 .vscode/extensions.json | 11 +++++++++++
 .vscode/settings.json   |  9 +++++++++
 help/IDEs.txt           |  9 ---------
 3 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000000..1df02d74800
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,11 @@
+{
+  "recommendations": [
+    "redhat.java",
+    "editorconfig.editorconfig",
+    "ast-grep.ast-grep-vscode"
+  ],
+  "unwantedRecommendations": [
+    "vscjava.vscode-java-pack",
+    "vscjava.vscode-gradle"
+  ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 00000000000..b4cd4217587
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,9 @@
+{
+  "java.import.gradle.enabled": false,
+  "java.import.maven.enabled": false,
+  "java.jdt.ls.lombokSupport.enabled": false,
+  "java.compile.nullAnalysis.mode": "disabled",
+  "java.completion.maxResults": 500,
+  "java.inlayHints.parameterNames.enabled": "all",
+  "astGrep.configPath": "gradle/validation/ast-grep/sgconfig.yml"
+}
diff --git a/help/IDEs.txt b/help/IDEs.txt
index fc766cdb1da..5229b64a96c 100644
--- a/help/IDEs.txt
+++ b/help/IDEs.txt
@@ -29,15 +29,6 @@ Run the following to set up Eclipse project files:
 
 Open the lucene checkout in VSCode.
 
-Install the recommended "Extension Pack for Java" if asked.
-
-View -> Command Palette -> Preferences: Open Settings UI
-Type 'java.import.gradle.enabled' and uncheck it.
-Type 'java.import.maven.enabled' and uncheck it.
-
-Restart VSCode.
-
-
 Neovim
 ======