-
Notifications
You must be signed in to change notification settings - Fork 59
Description
First of all many thanks for making this LSP happen; I've been waiting for this for years! ❤️
Now the issue is that the LSP returns a response for the textDocument/completion method with the newText always being an empty string and start/end being the same character. I think this breaks the completion in the Zed editor, so when trying to insert the completion nothing happens. In VS Code there might be different fallbacks for this case and it works.
Example response:
"textEdit": {
"newText": "",
"insert": {
"start": {
"line": 75,
"character": 15
},
"end": {
"line": 75,
"character": 15
}
},
"replace": {
"start": {
"line": 75,
"character": 15
},
"end": {
"line": 75,
"character": 15
}
}
}This seems to happen on purpose in the LSAbstractCompletionProvider where textEdit is set to emptyTextEdit().
Line 76 in 17728b9
| textEdit = emptyTextEdit(params.position), |
Perhaps this is to implement the first mode described in the spec, but in this case the textEdit should be omitted completely if I understand it correctly.
This might be a misunderstanding on my part and not an issue, as I don't really know much about the LSP specification, but I saw that there was this issue in Zed and not in VS Code and wanted to dig around to figure out why.