hide-org / hide

🤖 Headless IDE for AI agents
https://hide.sh
MIT License
112 stars 5 forks source link

Return diagnostics as soon as it's received from LSP server #96

Open artmoskvin opened 2 weeks ago

artmoskvin commented 2 weeks ago

Currently, document diagnostics is received asynchronously. Hide notifies LSP server about opening a file in one goroutine and listens for diagnostics in another. We didn't know how fast LSP servers would respond so we simply put the thread into sleep for 1 sec. Now we see that LSP servers (at least the ones we use) return diagnostics in less than 100 ms and we also know how to use switch statements in Go (talking about myself mostly :)

I propose we revisit our 1-sec-sleep solution and reimplement getting diagnostics properly with a switch statement thus reducing latency.