zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.7k stars 3.05k forks source link

Zed sends LSP inlayHint request where start greater than end. #18328

Open gohryt opened 1 month ago

gohryt commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

image

{
   "jsonrpc":"2.0",
   "id":11,
   "method":"textDocument/inlayHint",
   "params":{
      "textDocument":{
         "uri":"file:///home/gohryt/Documents/github.com/gohryt/activez/examples/001-cat.zig"
      },
      "range":{
         "start":{
            "line":41,
            "character":0
         },
         "end":{
            "line":25,
            "character":11
         }
      }
   }
}

This brings LSP to panic and requires manually restart

Environment

Zed: v0.153.6 (Zed) OS: Linux Wayland arch unknown Memory: 21.3 GiB Architecture: x86_64 GPU: AMD Radeon Graphics (RADV RENOIR) || radv || Mesa 24.2.3-arch1.1

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

[Zed.log](https://github.com/user-attachments/files/17128668/Zed.log)

SomeoneToIgnore commented 1 month ago

Seems to work fine overall, as it's the first report of a kind, so we might be hitting some interesting edge-case here. Can you share the project to repro this?

gohryt commented 1 month ago

Repo is https://github.com/gohryt/activez, there are changes on my local machine with it, but this error was at least month ago, and all the time after. zig master branch zls master branch