Skip to content

Commit 3a03f03

Browse files
authored
Set the default value of 'java.completion.matchCase' to 'firstLetter' (#3142)
* Set the default value of 'java.completion.matchCase' to 'firstLetter' Signed-off-by: Sheng Chen <[email protected]>
1 parent da2c8b6 commit 3a03f03

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ The following settings are supported:
212212
* `java.jdt.ls.protobufSupport.enabled`: Specify whether to automatically add Protobuf output source directories to the classpath. **Note:** Only works for Gradle `com.google.protobuf` plugin `0.8.4` or higher. Defaults to `true`.
213213
* `java.jdt.ls.androidSupport.enabled`: [Experimental] Specify whether to enable Android project importing. When set to `auto`, the Android support will be enabled in Visual Studio Code - Insiders. **Note:** Only works for Android Gradle Plugin `3.2.0` or higher. Defaults to `auto`.
214214
* `java.completion.postfix.enabled`: Enable/disable postfix completion support. Defaults to `true`.
215+
* `java.completion.matchCase`: Specify whether to match case for code completion. Defaults to `firstLetter`.
215216
* `java.compile.nullAnalysis.mode`: Specify how to enable the annotation-based null analysis. Supported values are `disabled` (disable the null analysis), `interactive` (asks when null annotation types are detected), `automatic` (automatically enable null analysis when null annotation types are detected). Defaults to `interactive`.
216217
* `java.cleanup.actionsOnSave`: The list of clean ups to be run on the current document when it's saved. Clean ups can automatically fix code style or programming mistakes. [Click here](document/_java.learnMoreAboutCleanUps.md#java-clean-ups) to learn more about what each clean up does.
217218
* `java.import.gradle.annotationProcessing.enabled`: Enable/disable the annotation processing on Gradle projects and delegate to JDT APT. Only works for Gradle 5.2 or higher.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -604,16 +604,14 @@
604604
"java.completion.matchCase": {
605605
"type": "string",
606606
"enum": [
607-
"auto",
608607
"firstLetter",
609608
"off"
610609
],
611610
"enumDescriptions": [
612-
"Only match case for the first letter when using Visual Studio Code - Insiders.",
613611
"Match case for the first letter when doing completion.",
614612
"Do not match case when doing completion."
615613
],
616-
"default": "auto",
614+
"default": "firstLetter",
617615
"markdownDescription": "Specify whether to match case for code completion.",
618616
"scope": "window"
619617
},

src/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,8 @@ export function getJavaConfig(javaHome: string) {
205205
break;
206206
}
207207

208-
const completionCaseMatching = javaConfig.completion.matchCase;
209-
if (completionCaseMatching === "auto") {
210-
javaConfig.completion.matchCase = isInsider ? "firstLetter" : "off";
208+
if (javaConfig.completion.matchCase === "auto") {
209+
javaConfig.completion.matchCase = "firstLetter";
211210
}
212211

213212
javaConfig.telemetry = { enabled: workspace.getConfiguration('redhat.telemetry').get('enabled', false) };

0 commit comments

Comments
 (0)