src/Tools/VSCode/src/protocol.scala
changeset 66062 175772371cd0
parent 66061 880db47fed30
child 66090 5e1c1b366ac3
--- a/src/Tools/VSCode/src/protocol.scala	Sat Jun 10 21:48:02 2017 +0200
+++ b/src/Tools/VSCode/src/protocol.scala	Sat Jun 10 22:48:35 2017 +0200
@@ -331,7 +331,9 @@
       JSON.optional("detail" -> detail) ++
       JSON.optional("documentation" -> documentation) ++
       JSON.optional("insertText" -> insertText) ++
-      JSON.optional("range" -> range.map(Range(_)))
+      JSON.optional("range" -> range.map(Range(_))) ++
+      JSON.optional("textEdit" ->
+        range.map(r => Map("range" -> Range(r), "newText" -> insertText.getOrElse(label))))
   }
 
   object Completion extends RequestTextDocumentPosition("textDocument/completion")