Currently when completions are returned from the server CodeLite doesn't take into account that there can be additionalTextEdits that are part of the CompletionItem. The can bee seen in the spec.
{
"isIncomplete": false,
"items": [
{
"label": "test",
"kind": 12,
"detail": ": String",
"preselect": true,
"sortText": "00000",
"filterText": "\"$test ",
"insertTextFormat": 1,
"textEdit": {
"range": {
"start": {
"line": 26,
"character": 12
},
"end": {
"line": 26,
"character": 16
}
},
"newText": "test"
},
"additionalTextEdits": [
{
"range": {
"start": {
"line": 26,
"character": 10
},
"end": {
"line": 26,
"character": 10
}
},
"newText": "s"
}
],
"data": {
"symbol": "example/Hello.test.",
"target": "file:/Users/ckipp/Documents/scala-workspace/metals-minimal-sbt/?id\u003droot"
}
}
]
}
Describe your idea in details
Currently when completions are returned from the server CodeLite doesn't take into account that there can be
additionalTextEditsthat are part of theCompletionItem. The can bee seen in the spec.Steps to reproduce
Trigger a completion that holds
additionalTextEdits. For example, here is one from Metals:Currently the
textEditis applied, but theadditionalTextEditsare not.