From 37b067849b907f022f6dabc8a04af38bbf291249 Mon Sep 17 00:00:00 2001 From: Martin Lippert Date: Fri, 1 Dec 2023 13:18:22 +0100 Subject: [PATCH] GH-1153: due to the new insert text mode setting , we do not need to deal with client-side magic indentation anymore --- .../languageserver/testharness/Editor.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/headless-services/commons/language-server-test-harness/src/main/java/org/springframework/ide/vscode/languageserver/testharness/Editor.java b/headless-services/commons/language-server-test-harness/src/main/java/org/springframework/ide/vscode/languageserver/testharness/Editor.java index f8e15bab8f..816a5149a1 100644 --- a/headless-services/commons/language-server-test-harness/src/main/java/org/springframework/ide/vscode/languageserver/testharness/Editor.java +++ b/headless-services/commons/language-server-test-harness/src/main/java/org/springframework/ide/vscode/languageserver/testharness/Editor.java @@ -458,17 +458,17 @@ public void apply(CompletionItem completion) throws Exception { String replaceWith = edit.getLeft().getNewText(); int cursorReplaceOffset = 0; - if (!Boolean.getBoolean("lsp.completions.indentation.enable")) { - //Apply indentfix, this is magic vscode seems to apply to edits returned by language server. So our harness has to - // mimick that behavior. See https://github.com/Microsoft/language-server-protocol/issues/83 - int referenceLine = edit.getLeft().getRange().getStart().getLine(); - int cursorOffset = edit.getLeft().getRange().getStart().getCharacter(); - String referenceIndent = doc.getLineIndentString(referenceLine); - if (cursorOffset