Swift Code Completion does not include a closing brace
Describe the bug If you let copilot generate a function, as it generates suggestions, when it is done, it never inserts the closing brace '}' so the end result is always a compilation error.
Versions
- Copilot for Xcode: 0.34
- Xcode: 16.3
- macOS: 15.4.1
Steps to reproduce
- create a new project or open existing one
- type func and let copilot start generating code. It will never include the closing } causing the compiler to complain.
I cannot reproduce it. When I'm typing, and use ⌥ + Tab to accept the full suggestion, it includes the closing brace.
https://github.com/user-attachments/assets/e03ba111-3083-4c27-9956-946bf2c2423c
Hi @testforstephen
yes, it only works if you hold Option key and let it generate the entire suggestion. However, my bug report was not for that. It was for a case where you keep hitting the tab key to let it generate one line at the time. Once it is done making suggestions, it will never insert the closing brace.
try it. If you can't repro, I will send a video.
Also, if you disable the "Accept suggestions with Tab" it will still make suggestions but when you hit tab, the suggestions just float on the screen. It looks really bad. I hope you guys are planning to add a little bit more options for tab completion, especially partial tab completion.
Thanks