-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override completion inserts extra pair of ()
when committing with (
#7699
Comments
Issue appears to be that the commit character There is some additional complexity - await completion likely wants the commit character inserted (it inserts a complex edit that ends before the commit character location - Note - Some ideas
Some example text edits
|
Hmm, in VS we disable further type char command handler to bypass things like brace completion. I have to examine commit chars for our existing complex edit items to have a better sense of the issue, but from the examples above (overrride and await completion), it seems one thing we might use to decide whether a commit char should be inserted is if it's part of the display text of a complex edit? e.g. |
A few issues
One potential idea was to check if the word at the cursor location + the next character was present inside the followup text edit text - and if so expand the range to the next character? Main issue I was worrying about is if the followup character happened to already be in the document (and wasn't used as a commit character). I haven't been able to come up with a broken scenario for that, but I'm not convinced. |
When committing an override completion item with
(
, an extra()
gets inserted.The text was updated successfully, but these errors were encountered: