Closed rommeswi closed 2 months ago
@rommeswi Which client do you use? It tried reproducing it with Visual Studio Code and Neovim without success so far.
I use Emacs.
@rommeswi This is an issue wihin Emacs, it is sending faulty notifications instead of a single correct one:
{
"jsonrpc": "2.0",
"method": "textDocument/didChange",
"params": {
"textDocument": { "uri": "...", "version": 1 },
"contentChanges": [
{
"range": {
"start": { "line": 0, "character": 0 },
"end": { "line": 0, "character": 0 }
},
"rangeLength": 0,
"text": "🖂"
}
]
}
}
{
"jsonrpc": "2.0",
"method": "textDocument/didChange",
"params": {
"textDocument": { "uri": "...", "version": 2 },
"contentChanges": [
{
"range": {
"start": { "line": 0, "character": 0 },
"end": { "line": 0, "character": 1 }
},
"rangeLength": 1,
"text": "🖂"
}
]
}
}
{
"jsonrpc": "2.0",
"method": "textDocument/didChange",
"params": {
"textDocument": { "uri": "...", "version": 3 },
"contentChanges": [
{
"range": {
"start": { "line": 0, "character": 0 },
"end": { "line": 0, "character": 1 }
},
"rangeLength": 1,
"text": "🖂"
}
]
}
}
Thank you, I would have never figured this out! I will report it to the emacs bugtracker.
Both when I paste 🖂 or use insert-char BACK OF ENVELOPE, the LSP server exits. Deleting the character causes the LSP server again to exit. However, undo after inserting the character leaves the LSP server running.