Open laralove143 opened 1 year ago
Unfortunately, this isn't supported yet by Nova 😔 I asked for this LSP feature to be added a year ago, but have not heard of any plans to add it. I might bump that request again.
It'd be awesome if everyone reading this could bump (Add heart reaction to or reply to) the feature request to Nova @kilbd made! We need this feature, come on Rustaceans!!!!
this is how the typescript extension does it, i haven't gotten to testing it yet but it's a possible approach
I haven't found yet where this functionality is implemented, but I assume it's helped by the fact that extensions are written in JavaScript and can potentially load in modules and inspect their exports. To implement something similar in Rust I'd need to roll my own Rust parser, which is too much of a commitment and unlikely to be done well.
I also noticed that the TypeScript extension's solution has issues.
The real solution for this and other language extensions is for Nova to continue improving its LSP support. That, or relax its grip on LSP messages, and possibly let extension developers opt into handling some of the messages.
Is your feature request related to a problem? Please describe. When using an out-of-scope items, we have to type it out, press
cmd+shift+a
, select the item we want to import and then continue coding. This comes up very frequently that other IDEs have added features for this.Describe the solution you'd like Items out-of-scope (from
std
and added crates) are shown in the completions, upon selection they are imported.