case insensitive .env variables completions

GitOrigin-RevId: 85519d78d864c135273682a4da61f6d5e91ed699
This commit is contained in:
adelf
2020-06-08 11:55:18 +03:00
committed by intellij-monorepo-bot
parent fa289505c6
commit 0fe61a1069

View File

@@ -1,6 +1,8 @@
package ru.adelf.idea.dotenv.common;
import com.intellij.codeInsight.completion.*;
import com.intellij.codeInsight.completion.CompletionContributor;
import com.intellij.codeInsight.completion.CompletionResultSet;
import com.intellij.codeInsight.completion.PrioritizedLookupElement;
import com.intellij.codeInsight.lookup.LookupElementBuilder;
import com.intellij.codeInsight.navigation.actions.GotoDeclarationHandler;
import com.intellij.openapi.project.Project;
@@ -14,7 +16,8 @@ abstract public class BaseEnvCompletionProvider extends CompletionContributor im
protected void fillCompletionResultSet(@NotNull CompletionResultSet completionResultSet, @NotNull Project project) {
for(Map.Entry<String, String> entry : EnvironmentVariablesApi.getAllKeyValues(project).entrySet()) {
LookupElementBuilder lockup = LookupElementBuilder.create(entry.getKey());
LookupElementBuilder lockup = LookupElementBuilder.create(entry.getKey())
.withLookupString(entry.getKey().toLowerCase());
if(StringUtils.isNotEmpty(entry.getValue())) {
lockup = lockup.withTailText(" = " + entry.getValue(), true);