Turning off auto import of using statements without disabling import suggestions in completion

Answered

Automatically importing using statements causes a lot of issues because Rider adds using statements for incomplete statements, typos, etc. that are completely unnecessary. However, suggesting using imports in completion and allowing us to select one if desired is a very useful feature. Rider has both of these features, but one setting, "Show import items in basic completion," controls both. It should be possible to disable auto import of using statements without disabling suggested imports in completion.

Previous request was marked answered by saying to use the option to disable both features. This is not a satisfactory way to resolve this issue: https://rider-support.jetbrains.com/hc/en-us/community/posts/360000610444-Turning-off-auto-import-of-using-statements?input_string=Turning%20off%20auto%20import%20of%20using%20statements%20without

14
5 comments

Unfortunately, that is not possible. Please upvote this feature request: https://youtrack.jetbrains.com/issue/RSRP-467250

1

Is this possible yet? I can't find a way to turn off the auto-added using statements. I know this is a very old thread, but I can't find anything more recent.

The linked issue did not actually address the problem. Someone apparently created a new issue, but the link doesn't work (not found).

 

0

Hi Greg

The feature has been implemented for ReSharper, but unfortunately, not for Rider. Feel free to upvote the issue; I've fixed its visibility. 

 

0

100% this - it's a threefold issue

One is that the autocomplete suggestions for unity are not very good - it always seems to want to autocomplete using the Unity VisualScripting namespace instead of a more common or already in use unity namespace, a prime example is Debug.Log is rarely the first choice.

But then second, is when I ctrl+z the autocomplete, it undoes the poor autocomplete but leaves the using statement that it added without undoing that change also!

The third issue is that there is no way to disable the auto-import and set it as suggestion only. As per VS.

We too have had build failures and overtime caused by this. It's an awful oversight that mars an otherwise great IDE. 
Code should be explicit - don't add random things secretly out of sight. This isn't autocomplete, its rubbish. It's Rider's version of Clippy.

0

Hello Scott,

While we understand your concern about the initial import-completion issue, we'd like to address unity completion problem as well. We have a couple of issues that could be relevant: RIDER-63160 (for which clearing caches or disabling ML completion in File | Settings | Editor | General | Code Completion could work) and RIDER-28170. Please feel free to comment or vote for them.

0

Please sign in to leave a comment.