Rider 2021.3.2 typing problem

For a while I've thought it was my own sloppy typing, but there is a generic method I have that when I type the open parenthesis, Rider really messes up the parentheses and angle brackets.

It's actually pretty simple to demonstrate, though I guess it will depend on various code style settings.

It occurs with a generic method in which it's known that the type cannot be inferred (due to lacking parameters).

So for example:

void Test<T>() {

}

if I call it I get this far (| is my cursor):

Test|

then when I type an open parenthesis (which chooses the method from the intellisense; this also happens if I press the '(' key early) it becomes this (| is my cursor):

Test<(|>()

So yeah, that's not really helpful at all... it has both generated the open/close parentheses but also generated the open parenth that I typed, but inside the also auto generated generic angle brackets, which is not valid syntax. I guess putting my cursor in the type argument list is probably ok since I have to specify a type. So really it's just the failure to consume the keystroke character that is the problem I guess.

I can press ESC to close the intellisense and then it doesn't happen, so it's specifically choosing the method from intellisense that does it. Trying other keys the only others I know that trigger the selection are tab and enter and they don't have problems. Also if the signature is different, the parenth is not doubled.

1 comment
Comment actions Permalink

Hello Dave,

Disabling Preferences | Editor | General | Code Completion | Preselect the best match to insert it by pressing dot, parentheses and other keys should help with changing the behavior. 

0

Please sign in to leave a comment.