Add space to empty edit because vscode doesn't like empty strings.
This commit is contained in:
@@ -135,6 +135,11 @@ public class LspCompletionInterpreter implements IDocumentState {
|
||||
if (afterEdit!=null) additionalEdits.add(afterEdit);
|
||||
item.setAdditionalTextEdits(additionalEdits.build());
|
||||
|
||||
if (mainEdit!=null && mainEdit.getNewText().equals("")) {
|
||||
//Vscode handles this poorly and adds 'junk' instead.
|
||||
mainEdit.setNewText(" "); // Adding a space. It is still junk but it is at least not immediately visible.
|
||||
}
|
||||
|
||||
if (needsCursorMove) {
|
||||
Position position = docState.getDocument().toPosition(docState.getCursor());
|
||||
item.setCommand(new Command("Move Cursor", server.MOVE_CURSOR_COMMAND_ID, ImmutableList.of(originalDoc.getUri(), position)));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
../mvnw \
|
||||
-Dmaven.test.skip=true \
|
||||
-f ../pom.xml \
|
||||
-pl spring-boot-language-server \
|
||||
-am \
|
||||
|
||||
Reference in New Issue
Block a user