emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.72k stars 860 forks source link

Texlab lsp server exits on unicode letter 1F582 #4469

Open rommeswi opened 4 weeks ago

rommeswi commented 4 weeks ago

Thank you for the bug report

Bug description

Please see https://github.com/latex-lsp/texlab/issues/1130

Steps to reproduce

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.

According to the texlab and emacs developers, the issue arises from lsp-mode sending faulty notifications:


  "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": "🖂"
      }
    ]
  }
}```

### Expected behavior

Language server should not crash when inserting unicode symbols.

### Which Language Server did you use?

texlab

### OS

Linux

### Error callstack

_No response_

### Anything else?

_No response_