DanTup · GitHub

I have a completion provider that inserts parens when completing method calls, eg. myFunc(). Today I tried adding ( as a commit character so that if I've typed myFun and press ( then it'll still complete. However this results in myFunc()() because the completion text includes the parens, the commit character then gets added, and then the automatic closing paren.

Although I could remove the parens from the completion, then they wouldn't be inserted if you hit <enter> either.

Matt Bierner (@mjbvz) suggested raising this as he may have had a similar issue with snippets in JS/TS.

Is there a good workaround for this, or can the API be extended in some way to handle this?

Read the original on github.com ↗