Hide default snippets from intellisense member suggestions
I'm using Rider 2022.2.4, with a Unity 2020.3 project.
When typing a period after a variable or class name the intellisense suggestion dropdown (I'm not sure what the specific term in Rider is) includes some non-member snippets, such as 'new', 'typeof' and 'var' here:
Which when selected will insert a relevant snippet for the given variable/class. eg. when I select 'var' this snippet is inserted:
I personally don't find these snippets that useful, and don't find myself ever using them.
If I use the code completion shortcut for type-matching (default Ctrl+Alt+Space) after having typed the period, then these snippet suggestions are not shown:
Is there a way to control which of these options is visible when typing the period?
Specifically, is there a setting to not see the non-member snippets 'new', 'typeof', 'var', etc. when I type the period after a type or variable, without also then having to use Ctrl+Alt+Space?
I'm assuming such a setting could be located in Editor > General > Code Completion, but I'm missing it if such a setting exists there.
Please sign in to leave a comment.
Hello Jpeter,
Thank you for contacting Rider support.
This behavior is configurable, but, regrettably, there is no UI for that in Rider yet. We would appreciate it if you could upvote this issue to demonstrate your interest.
The following workaround would help you to remove the mentioned items from a completion list.
If you have ReSharper:
ReSharper | Options | Code Editing | Postfix Templates
;File | Settings | Tools | ReSharper | Synchronize machine-wide Rider and ReSharper settings
option and restart Rider.If you have no ReSharper:
File | Settings | Editor | Code Style | C#
;GlobalSettingsStorage.DotSettings
file (Help | Diagnostic Tools | Special Files and Folder | double click on the "R# global settings" | open the resharper-host folder
);<s:Boolean x:Key="/Default/Environment/PostfixTemplates/ShowPostfixItemsInCodeCompletion/@EntryValue">False</s:Boolean>
So it would look like as belowHope it helps.
Should you have any other questions or difficulties, please let me know.
Have a nice day!