kilbd / nova-rust

A Rust extension for the Nova text editor, using the Rust Analyzer language server.
MIT License
29 stars 5 forks source link

Downloading the Rust Analyzer binary inside the extension #6

Closed laralove143 closed 3 years ago

laralove143 commented 3 years ago

It'd be better UX to have it work instantly with minimal setup and even have it update automatically. It's pretty simple but I lack the TS knowledge to write this confidently

kilbd commented 3 years ago

Great idea! Thank you for thinking of ways to improve UX! I'll have to marinate on the best way to approach bundling in RA and keeping it updated.

laralove143 commented 3 years ago

of course! i have other ideas lemme spam them lol

kilbd commented 3 years ago

I have this implemented, but I'm a bit nervous that I can't really test it in Dev Mode. Nova reloads the extension after any file change, so updating the binary on activation causes an infinite loop. I had to have it skip updates in Dev Mode. Panic is aware of the issue (I stumbled on the explanation in their extension forum), and claims to have it in their backlog.

I suppose we'll hope for the best!

laralove143 commented 3 years ago

oh yes it's more complicated than it seems i guess. maybe it'd suffice if we check for updates/if the binary exists and get/update it if not and then restart the extension

kilbd commented 3 years ago

Yep, that's essentially what I'm doing. It should work fine for users, this is just an issue when developing the extension (using Activate Project as Extension).

I'm going to close this issue, and if it doesn't work properly for someone they can open a bug report.