Skip to content

Support suppressing commit character from being inserted during completion #42544

@DanTup

Description

@DanTup

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.

@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?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions