astoff / digestif

A language server for TeX and friends
Other
255 stars 6 forks source link

"Range length mismatch" Error #10

Closed nikplx closed 4 years ago

nikplx commented 4 years ago

Hi Astoff, I got your Language Server running with Emacs 27 on Arch Linux. Currently I am using LSP-mode with company for completion, when editing LaTeX projects. I installed the Server via luarocks. So far everything works as expected, but I get a random occuring error, that freezes my whole Emacs for about 2 Seconds. Usually it occurs while fastly deleting some words, but I can not pin it down completely. Therefore I can not provide a manual for reproducing. But the Error happens on both my Arch Linux Systems.

Error Message is: error in process filter: Unknown message type: #s(hash-table size 3test equal rehash-treshold 0.8125 data ("error" #s(hash-tabel size 2 test equal rehash-site 1.5 rehash-treshold 0.8125 data ("code" 1 "message" "/use/share/lua/5.3/digestif/langserver.lua:179: Range length mismatch in textdocument/didChange operation")) "result" nil "jsonrpc" "2.0"))

astoff commented 4 years ago

If, as I suppose, you get this every time you delete a non-ASCII character, then it should be fixed in the current git version. (If you are interested in testing, you can install it with luarocks install https://raw.githubusercontent.com/astoff/digestif/master/digestif-dev-1.rockspec.)

You will probably still get errors when inserting/deleting Unicode characters from a supplementary plane (like math symbols and emojis, but not accented characters), but that's another story.

nikplx commented 4 years ago

Problem occured when deleting the german ü,ö,ä characters. Installing dev-1 solved it for me. Thanks for the fast response, keep up the good work!