XCode code completes in comments

Every time I press return/enter or space in the comments code completion suggests the expect() from the Nimble framework

https://stackoverflow.com/questions/69442228/xcode-13-autocompletes-text-in-comments

I tried installing XCode 13.1 over XCode 13.0 to no avail.

This really makes writing comments more of a chore than it has to be.

I cannot reproduce the issue neither with Xcode 13 nor Xcode 13.1 RC. I do not know what Nimble is, but if you once installed it in any of the projects on your Mac, it might be affecting. Better try the same thing on a brand new Mac (on which you have never used Nimble thing). Even if that was not the cause of the issue, you may need to find the condition to reproduce it.

O did not reproduce either in Xcode 13.1 playground.

It is likely that Nimble is causing a problem for auto completion (or that's the desired Nimble behaviour ?). So may be it is not Xcode messing up your comments, but Nimble. Did you ask developer ? Do you see the problem in Xcode 12 ?

I had the same problem in my comments. In my case it was a custom code snippet that I had added for Objective C, but I had it set as All Languages and at all levels. I changed my code snippets properties and now I don't have that annoying popup whenever I'm writing comments.

I'm guessing that Nimble created a code snippet and it doesn't have the correct properties so that it shows up at all times, even in comments. Type Shift + CMD + L and see if you can find that expect code snippet and fix or remove it.

XCode code completes in comments
 
 
Q