Environment:
- Fedora Linux 44
- Zed 1.15.0 (Flatpak)
- Lua plugin 0.1.10
- LuaLS 3.19.1
Issue:
Interacting with strings containing escapes that appear like broken UTF-8, crashes the entire LSP. This includes interacting with variables containing those strings.
Replication:
- Write the following code:
- Attempt to hover the string or reference the variable
- Language server crashes with an UTF-8 parse error:
2026-08-14T22:28:31+02:00 ERROR [crates/lsp/src/lsp.rs:547] invalid utf-8 sequence of 1 bytes from index 113
2026-08-14T22:28:31+02:00 ERROR [lsp] Server reset connection for a request "textDocument/hover" id 18
2026-08-14T22:28:31+02:00 WARN [project::lsp_store] Get hover via lua-language-server failed: Server reset the connection
2026-08-14T22:28:31+02:00 ERROR [project::lsp_store] Error handling response for request GetHover { position: PointUtf16 { row: 0, column: 14 } }: Get hover via lua-language-server failed: Server reset the connection
2026-08-14T22:28:32+02:00 WARN [project::lsp_store] Get hover via lua-language-server failed: server shut down
- The language server does not come back online.
Expected behaviour:
It should not crash on any kind of escaped sequence contained within string literals. If the sequence cannot be interpreted for display, it should be reported as-is or escaped bytewise, similar to what clangd does:

Environment:
Issue:
Interacting with strings containing escapes that appear like broken UTF-8, crashes the entire LSP. This includes interacting with variables containing those strings.
Replication:
Expected behaviour:
It should not crash on any kind of escaped sequence contained within string literals. If the sequence cannot be interpreted for display, it should be reported as-is or escaped bytewise, similar to what clangd does: