diff --git a/docs/LSPApi.md b/docs/LSPApi.md index 4ef144ad0..ea93dea75 100644 --- a/docs/LSPApi.md +++ b/docs/LSPApi.md @@ -61,6 +61,7 @@ public class MyLanguageServerFactory implements LanguageServerFactory { | boolean keepServerAlive() | Returns `true` if the server is kept alive even if all files associated with the language server are closed and `false` otherwise. | `false` | | boolean canStopServerByUser() | Returns `true` if the user can stop the language server in LSP console from the context menu and `false` otherwise. | `true` | | boolean isEnabled(VirtualFile) | Returns `true` if the language server is enabled for the given file and `false` otherwise. | `true` | +| boolean isCaseSensitive(PsiFile file) | Returns `true` if the language grammar for the given file is case-sensitive and `false` otherwise. | `false` | ```java package my.language.server; @@ -229,7 +230,7 @@ public class MyLSPCodeLensFeature extends LSPCodeLensFeature { | boolean isStrikeout(CompletionItem item) | Returns true if the IntelliJ lookup is strike out and false otherwise. | use `item.getDeprecated()` or `item.getTags().contains(CompletionItemTag.Deprecated)` | | String getTailText(CompletionItem item) | Returns the IntelliJ lookup tail text from the given LSP completion item and null otherwise. | `item.getLabelDetails().getDetail()` | | boolean isItemTextBold(CompletionItem item) | Returns the IntelliJ lookup item text bold from the given LSP completion item and null otherwise. | `item.getKind() == CompletionItemKind.Keyword` | -| boolean isCaseSensitive(PsiFile file) | Determines whether or not completions should be offered in a case-sensitive manner. | Case-insensitive. | +| ## LSP Declaration Feature diff --git a/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerWrapper.java b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerWrapper.java index 7f7bb30cf..8a073afa3 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerWrapper.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/LanguageServerWrapper.java @@ -1169,6 +1169,7 @@ public boolean isDidRenameFilesSupported(@NotNull PsiFile file) { return fileOperationsManager.canDidRenameFiles(LSPIJUtils.toUri(file), file.isDirectory()); } + @NotNull public LSPClientFeatures getClientFeatures() { if (clientFeatures == null) { clientFeatures = getOrCreateClientFeatures(); @@ -1176,6 +1177,7 @@ public LSPClientFeatures getClientFeatures() { return clientFeatures; } + @NotNull private synchronized LSPClientFeatures getOrCreateClientFeatures() { if (clientFeatures != null) { return clientFeatures; diff --git a/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPClientFeatures.java b/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPClientFeatures.java index b2808fd12..9b2822435 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPClientFeatures.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPClientFeatures.java @@ -13,6 +13,7 @@ import com.intellij.openapi.Disposable; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.PsiFile; import com.redhat.devtools.lsp4ij.LSPRequestConstants; import com.redhat.devtools.lsp4ij.LanguageServerWrapper; import com.redhat.devtools.lsp4ij.ServerStatus; @@ -964,6 +965,17 @@ public boolean isEnabled(@NotNull VirtualFile file) { return true; } + /** + * Determines whether or not the language grammar for the file is case-sensitive. + * + * @param file the file + * @return true if the file's language grammar is case-sensitive; otherwise false + */ + public boolean isCaseSensitive(@NotNull PsiFile file) { + // Default to case-insensitive + return false; + } + /** * Set the language server wrapper. * diff --git a/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPCompletionFeature.java b/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPCompletionFeature.java index fb7e01afa..ce6bea948 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPCompletionFeature.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/client/features/LSPCompletionFeature.java @@ -229,8 +229,8 @@ public void addLookupItem(@NotNull LSPCompletionContext context, @NotNull LookupElement lookupItem, int priority, @NotNull CompletionItem item) { - // Determine whether or not completions should be case-sensitive - boolean caseSensitive = isCaseSensitive(context.getParameters().getOriginalFile()); + // Determine whether or not completions in this language should be case-sensitive + boolean caseSensitive = getClientFeatures().isCaseSensitive(context.getParameters().getOriginalFile()); var prioritizedLookupItem = PrioritizedLookupElement.withPriority(lookupItem, priority); @@ -293,15 +293,4 @@ public void setServerCapabilities(@Nullable ServerCapabilities serverCapabilitie completionCapabilityRegistry.setServerCapabilities(serverCapabilities); } } - - /** - * Determines whether or not completions for the file should be offered in a case-sensitive manner. - * - * @param file the file - * @return true if completions should be offered in a case-sensitive manner; otherwise false - */ - public boolean isCaseSensitive(@NotNull PsiFile file) { - // Default to case-insensitive - return false; - } } diff --git a/src/main/java/com/redhat/devtools/lsp4ij/features/rename/LSPRenameRefactoringDialog.java b/src/main/java/com/redhat/devtools/lsp4ij/features/rename/LSPRenameRefactoringDialog.java index 3fb370fd8..4b53df1b9 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/features/rename/LSPRenameRefactoringDialog.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/features/rename/LSPRenameRefactoringDialog.java @@ -13,11 +13,17 @@ *******************************************************************************/ package com.redhat.devtools.lsp4ij.features.rename; +import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.fileTypes.FileTypes; +import com.intellij.openapi.progress.ProgressIndicator; +import com.intellij.openapi.progress.ProgressManager; +import com.intellij.openapi.progress.Task; +import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.psi.PsiFile; +import com.intellij.psi.PsiReference; import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.ui.NameSuggestionsField; import com.intellij.refactoring.ui.RefactoringDialog; @@ -27,11 +33,16 @@ import com.redhat.devtools.lsp4ij.features.refactoring.WorkspaceEditData; import com.redhat.devtools.lsp4ij.internal.CancellationUtil; import com.redhat.devtools.lsp4ij.internal.StringUtils; +import com.redhat.devtools.lsp4ij.usages.LSPExternalReferencesFinder; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import javax.swing.*; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.ExecutionException; @@ -47,6 +58,8 @@ */ class LSPRenameRefactoringDialog extends RefactoringDialog { + private static final Logger LOGGER = LoggerFactory.getLogger(LSPRenameRefactoringDialog.class); + @NotNull private final LSPRenameParams renameParams; @@ -143,6 +156,10 @@ protected boolean areButtonsValid() { static void doRename(@NotNull LSPRenameParams renameParams, @NotNull PsiFile psiFile, @NotNull Editor editor) { + // Before having the language server perform the rename, see if there are any external references that should + // also be updated upon successful completion by the language server + int offset = editor.getCaretModel().getOffset(); + Set externalReferences = getExternalReferences(psiFile, offset); CompletableFuture> future = LSPFileSupport.getSupport(psiFile) .getRenameSupport() @@ -152,7 +169,8 @@ static void doRename(@NotNull LSPRenameParams renameParams, // The 'rename' is stopped: // - if user change the editor content // - if it cancels the Task - String title = LanguageServerBundle.message("lsp.refactor.rename.progress.title", psiFile.getVirtualFile().getName(), renameParams.getNewName()); + String newName = renameParams.getNewName(); + String title = LanguageServerBundle.message("lsp.refactor.rename.progress.title", psiFile.getVirtualFile().getName(), newName); waitUntilDoneAsync(future, title, psiFile); future.handle((workspaceEdits, error) -> { @@ -174,8 +192,19 @@ static void doRename(@NotNull LSPRenameParams renameParams, LSPRenameHandler.showErrorHint(editor, LanguageServerBundle.message("lsp.refactor.rename.cannot.be.renamed.error")); } else { // Apply the rename from the LSP WorkspaceEdit list - WriteCommandAction - .runWriteCommandAction(psiFile.getProject(), () -> workspaceEdits.forEach(workspaceEditData -> LSPIJUtils.applyWorkspaceEdit(workspaceEditData.edit()))); + WriteCommandAction.runWriteCommandAction(psiFile.getProject(), () -> { + workspaceEdits.forEach(workspaceEditData -> LSPIJUtils.applyWorkspaceEdit(workspaceEditData.edit())); + + // Update any found external references with the new name + externalReferences.forEach(externalReference -> { + // Don't let a single failed external reference keep us from updating other references + try { + externalReference.handleElementRename(newName); + } catch (Exception e) { + LOGGER.warn("External reference rename failed.", e); + } + }); + }); } return workspaceEdits; }); @@ -192,4 +221,32 @@ protected void dispose() { super.dispose(); } + @NotNull + private static Set getExternalReferences(@NotNull PsiFile file, int offset) { + Set externalReferences = new LinkedHashSet<>(); + + // When testing, just collect references on the current thread + if (ApplicationManager.getApplication().isUnitTestMode()) { + LSPExternalReferencesFinder.processExternalReferences(file, offset, reference -> { + externalReferences.add(reference); + return true; + }); + } else { + // This should happen on a progress indicator since it's performing a textual search of project + // sources, and it must be modal as we need the results synchronously + Project project = file.getProject(); + ProgressManager.getInstance().run(new Task.Modal(project, "Finding External References", true) { + @Override + public void run(@NotNull ProgressIndicator progressIndicator) { + progressIndicator.setIndeterminate(true); + LSPExternalReferencesFinder.processExternalReferences(file, offset, reference -> { + externalReferences.add(reference); + return true; + }); + } + }); + } + + return externalReferences; + } } diff --git a/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/ClientConfigurationSettings.java b/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/ClientConfigurationSettings.java index 45a126bfe..f3e9b15f7 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/ClientConfigurationSettings.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/ClientConfigurationSettings.java @@ -19,30 +19,20 @@ * Client-side settings for a user-defined language server configuration. */ public class ClientConfigurationSettings { - /** - * Client-side code completion settings. - */ - public static class ClientConfigurationCompletionSettings { - /** - * Whether or not completions should be offered as case-sensitive. Defaults to false. - */ - public boolean caseSensitive = false; - } - /** * Client-side code workspace symbol settings. */ public static class ClientConfigurationWorkspaceSymbolSettings { /** - * Whether or not completions should be offered as case-sensitive. Defaults to false. + * Whether or not the language server can support the IDE's Go To Class action efficiently. Defaults to false. */ public boolean supportsGotoClass = false; } /** - * Client-side code completion settings + * Whether or not the language grammar is case-sensitive. Defaults to false. */ - public @NotNull ClientConfigurationCompletionSettings completions = new ClientConfigurationCompletionSettings(); + public boolean caseSensitive = false; /** * Client-side code workspace symbol settings diff --git a/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/UserDefinedClientFeatures.java b/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/UserDefinedClientFeatures.java index df6fe13f1..093294da3 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/UserDefinedClientFeatures.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/UserDefinedClientFeatures.java @@ -13,7 +13,9 @@ *******************************************************************************/ package com.redhat.devtools.lsp4ij.server.definition.launching; +import com.intellij.psi.PsiFile; import com.redhat.devtools.lsp4ij.client.features.LSPClientFeatures; +import org.jetbrains.annotations.NotNull; /** * Adds client-side configuration features. @@ -24,7 +26,12 @@ public UserDefinedClientFeatures() { super(); // Use the extended feature implementations - setCompletionFeature(new UserDefinedCompletionFeature()); setWorkspaceSymbolFeature(new UserDefinedWorkspaceSymbolFeature()); } + + public boolean isCaseSensitive(@NotNull PsiFile file) { + UserDefinedLanguageServerDefinition serverDefinition = (UserDefinedLanguageServerDefinition) getServerDefinition(); + ClientConfigurationSettings clientConfiguration = serverDefinition.getLanguageServerClientConfiguration(); + return (clientConfiguration != null) && clientConfiguration.caseSensitive; + } } diff --git a/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/UserDefinedCompletionFeature.java b/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/UserDefinedCompletionFeature.java deleted file mode 100644 index 370466eb7..000000000 --- a/src/main/java/com/redhat/devtools/lsp4ij/server/definition/launching/UserDefinedCompletionFeature.java +++ /dev/null @@ -1,31 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2024 Red Hat Inc. and others. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 - * which is available at https://www.apache.org/licenses/LICENSE-2.0. - * - * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 - * - * Contributors: - * Red Hat Inc. - initial API and implementation - *******************************************************************************/ -package com.redhat.devtools.lsp4ij.server.definition.launching; - -import com.intellij.psi.PsiFile; -import com.redhat.devtools.lsp4ij.client.features.LSPCompletionFeature; -import org.jetbrains.annotations.NotNull; - -/** - * Adds client-side completion configuration features. - */ -public class UserDefinedCompletionFeature extends LSPCompletionFeature { - - @Override - public boolean isCaseSensitive(@NotNull PsiFile file) { - UserDefinedLanguageServerDefinition serverDefinition = (UserDefinedLanguageServerDefinition) getClientFeatures().getServerDefinition(); - ClientConfigurationSettings clientConfiguration = serverDefinition.getLanguageServerClientConfiguration(); - return clientConfiguration != null ? clientConfiguration.completions.caseSensitive : super.isCaseSensitive(file); - } -} diff --git a/src/main/java/com/redhat/devtools/lsp4ij/usages/LSPExternalReferencesFinder.java b/src/main/java/com/redhat/devtools/lsp4ij/usages/LSPExternalReferencesFinder.java new file mode 100644 index 000000000..5766d361f --- /dev/null +++ b/src/main/java/com/redhat/devtools/lsp4ij/usages/LSPExternalReferencesFinder.java @@ -0,0 +1,152 @@ +/******************************************************************************* + * Copyright (c) 2024 Red Hat Inc. and others. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 + * which is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 + * + * Contributors: + * Red Hat Inc. - initial API and implementation + *******************************************************************************/ +package com.redhat.devtools.lsp4ij.usages; + +import com.intellij.openapi.application.ReadAction; +import com.intellij.openapi.editor.Document; +import com.intellij.openapi.progress.ProgressIndicator; +import com.intellij.openapi.progress.ProgressManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.TextRange; +import com.intellij.openapi.util.text.StringUtil; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiFile; +import com.intellij.psi.PsiReference; +import com.intellij.psi.impl.source.resolve.reference.PsiReferenceUtil; +import com.intellij.psi.search.PsiSearchHelper; +import com.intellij.psi.search.UsageSearchContext; +import com.intellij.util.Processor; +import com.redhat.devtools.lsp4ij.LSPIJUtils; +import com.redhat.devtools.lsp4ij.LanguageServiceAccessor; +import com.redhat.devtools.lsp4ij.features.LSPPsiElement; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.*; + +/** + * Utility class that helps to process/find external references to LSP4IJ-based (pseudo-)elements. + */ +public final class LSPExternalReferencesFinder { + + private LSPExternalReferencesFinder() { + // Pure utility class + } + + /** + * Processes all external references for the LSP4IJ element at the offset in the specified file. + * + * @param file the file for which the element at the specified offset should be processed for external references + * @param offset the offset of the element in the file + * @param processor the external reference processor + */ + public static void processExternalReferences(@NotNull PsiFile file, + int offset, + @NotNull Processor processor) { + VirtualFile virtualFile = file.getVirtualFile(); + if (virtualFile != null) { + Document document = LSPIJUtils.getDocument(virtualFile); + TextRange wordTextRange = document != null ? LSPIJUtils.getWordRangeAt(document, file, offset) : null; + if (wordTextRange != null) { + LSPPsiElement wordElement = new LSPPsiElement(file, wordTextRange); + String wordText = wordElement.getText(); + if (StringUtil.isNotEmpty(wordText)) { + processExternalReferences( + file, + wordText, + wordTextRange, + ProgressManager.getInstance().getProgressIndicator(), + processor + ); + } + } + } + } + + private static void processExternalReferences(@NotNull PsiFile file, + @NotNull String wordText, + @NotNull TextRange wordTextRange, + @Nullable ProgressIndicator progressIndicator, + @NotNull Processor processor) { + VirtualFile virtualFile = file.getVirtualFile(); + if (virtualFile == null) { + return; + } + + // Determine whether or not to search/match in a case-sensitive manner based on client configuration + Project project = file.getProject(); + boolean caseSensitive = LanguageServiceAccessor.getInstance(project) + .hasAny(file.getVirtualFile(), ls -> ls.getClientFeatures().isCaseSensitive(file)); + + if (progressIndicator != null) { + progressIndicator.setText("Finding usages of '" + wordText + "'"); + } + + Set externalReferenceKeys = new HashSet<>(); + PsiSearchHelper.getInstance(project).processElementsWithWord( + (element, offsetInElement) -> { + PsiReference originalReference = element.findReferenceAt(offsetInElement); + List references = originalReference != null ? + PsiReferenceUtil.unwrapMultiReference(originalReference) : + Collections.emptyList(); + for (PsiReference reference : references) { + // Deduplicate using a unique key with reference type, file, and text range + String referenceKey = getReferenceKey(reference); + if (referenceKey != null) { + // Only add references we haven't added previously + if (!externalReferenceKeys.contains(referenceKey)) { + PsiElement targetElement = reference.resolve(); + PsiFile targetFile = targetElement != null ? targetElement.getContainingFile() : null; + // Files match + if ((targetFile != null) && Objects.equals(file, targetFile)) { + // Text ranges match + TextRange targetTextRange = targetElement.getTextRange(); + if ((targetTextRange != null) && Objects.equals(wordTextRange, targetTextRange)) { + // Text matches according to case-sensitivity + String targetText = reference.getCanonicalText(); + if (caseSensitive ? wordText.equals(targetText) : wordText.equalsIgnoreCase(targetText)) { + if (!processor.process(reference)) { + return false; + } + externalReferenceKeys.add(referenceKey); + } + } + } + } + } + } + if (progressIndicator != null) { + progressIndicator.checkCanceled(); + } + return true; + }, + ReadAction.compute(file::getUseScope), + wordText, + UsageSearchContext.ANY, + caseSensitive + ); + } + + @Nullable + private static String getReferenceKey(@NotNull PsiReference reference) { + PsiElement sourceElement = reference.getElement(); + PsiFile sourceFile = sourceElement.getContainingFile(); + VirtualFile sourceVirtualFile = sourceFile != null ? sourceFile.getVirtualFile() : null; + if (sourceVirtualFile != null) { + return reference.getClass().getName() + "::" + sourceVirtualFile.getPath() + "::" + reference.getAbsoluteRange(); + } + return null; + } +} diff --git a/src/main/java/com/redhat/devtools/lsp4ij/usages/LSPUsageSearcher.java b/src/main/java/com/redhat/devtools/lsp4ij/usages/LSPUsageSearcher.java index 7aa60facf..f37899059 100644 --- a/src/main/java/com/redhat/devtools/lsp4ij/usages/LSPUsageSearcher.java +++ b/src/main/java/com/redhat/devtools/lsp4ij/usages/LSPUsageSearcher.java @@ -15,6 +15,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.editor.Document; +import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; @@ -43,6 +44,7 @@ *
  • Type Definitions
  • *
  • References
  • *
  • Implementations
  • + *
  • External References
  • * */ public class LSPUsageSearcher extends CustomUsageSearcher { @@ -89,9 +91,14 @@ public void processElementUsages(@NotNull PsiElement element, @NotNull Processor } } } + } catch (ProcessCanceledException pce) { + throw pce; } catch (Exception e) { LOGGER.error("Error while collection LSP Usages", e); } + + // For completeness' sake, also collect external usages to LSP (pseudo-)elements + LSPExternalReferencesFinder.processExternalReferences(file, element.getTextOffset(), reference -> processor.process(new UsageInfo2UsageAdapter(new UsageInfo(reference)))); } @Nullable diff --git a/src/main/resources/jsonSchema/clientSettings.schema.json b/src/main/resources/jsonSchema/clientSettings.schema.json index 27867ad94..907db4f3f 100644 --- a/src/main/resources/jsonSchema/clientSettings.schema.json +++ b/src/main/resources/jsonSchema/clientSettings.schema.json @@ -5,18 +5,11 @@ "type": "object", "additionalProperties": false, "properties": { - "completions": { - "type": "object", - "title": "Client-side completion configuration", - "additionalProperties": false, - "properties": { - "caseSensitive": { - "type": "boolean", - "title": "Completion case-sensitivity", - "description": "Whether or not completions should be offered as case-sensitive.", - "default": false - } - } + "caseSensitive": { + "type": "boolean", + "title": "Language grammar case-sensitivity", + "description": "Whether or not the language grammar is case-sensitive.", + "default": false }, "workspaceSymbol": { "type": "object", diff --git a/src/main/resources/templates/clojure-lsp/clientSettings.json b/src/main/resources/templates/clojure-lsp/clientSettings.json index b9ae8989b..2a717ac8d 100644 --- a/src/main/resources/templates/clojure-lsp/clientSettings.json +++ b/src/main/resources/templates/clojure-lsp/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": true } diff --git a/src/main/resources/templates/gopls/clientSettings.json b/src/main/resources/templates/gopls/clientSettings.json index b9ae8989b..2a717ac8d 100644 --- a/src/main/resources/templates/gopls/clientSettings.json +++ b/src/main/resources/templates/gopls/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": true } diff --git a/src/main/resources/templates/jdtls/clientSettings.json b/src/main/resources/templates/jdtls/clientSettings.json index b9ae8989b..2a717ac8d 100644 --- a/src/main/resources/templates/jdtls/clientSettings.json +++ b/src/main/resources/templates/jdtls/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": true } diff --git a/src/main/resources/templates/lemminx/clientSettings.json b/src/main/resources/templates/lemminx/clientSettings.json index 0cac35366..b3239a2d2 100644 --- a/src/main/resources/templates/lemminx/clientSettings.json +++ b/src/main/resources/templates/lemminx/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": false } diff --git a/src/main/resources/templates/metals/clientSettings.json b/src/main/resources/templates/metals/clientSettings.json index b9ae8989b..2a717ac8d 100644 --- a/src/main/resources/templates/metals/clientSettings.json +++ b/src/main/resources/templates/metals/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": true } diff --git a/src/main/resources/templates/rust-analyzer/clientSettings.json b/src/main/resources/templates/rust-analyzer/clientSettings.json index b9ae8989b..2a717ac8d 100644 --- a/src/main/resources/templates/rust-analyzer/clientSettings.json +++ b/src/main/resources/templates/rust-analyzer/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": true } diff --git a/src/main/resources/templates/sourcekit-lsp/clientSettings.json b/src/main/resources/templates/sourcekit-lsp/clientSettings.json index b9ae8989b..2a717ac8d 100644 --- a/src/main/resources/templates/sourcekit-lsp/clientSettings.json +++ b/src/main/resources/templates/sourcekit-lsp/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": true } diff --git a/src/main/resources/templates/typescript-language-server/clientSettings.json b/src/main/resources/templates/typescript-language-server/clientSettings.json index b9ae8989b..2a717ac8d 100644 --- a/src/main/resources/templates/typescript-language-server/clientSettings.json +++ b/src/main/resources/templates/typescript-language-server/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": true } diff --git a/src/main/resources/templates/vscode-css-language-server/clientSettings.json b/src/main/resources/templates/vscode-css-language-server/clientSettings.json index 0cac35366..b3239a2d2 100644 --- a/src/main/resources/templates/vscode-css-language-server/clientSettings.json +++ b/src/main/resources/templates/vscode-css-language-server/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": true - }, + "caseSensitive": true, "workspaceSymbol": { "supportsGotoClass": false } diff --git a/src/main/resources/templates/vscode-html-language-server/clientSettings.json b/src/main/resources/templates/vscode-html-language-server/clientSettings.json index e97cd6519..00d4fb8df 100644 --- a/src/main/resources/templates/vscode-html-language-server/clientSettings.json +++ b/src/main/resources/templates/vscode-html-language-server/clientSettings.json @@ -1,7 +1,5 @@ { - "completions": { - "caseSensitive": false - }, + "caseSensitive": false, "workspaceSymbol": { "supportsGotoClass": false }