Code completion for standard types Follow
Hi, I'm using latest CLion version, with default code completion settings. Code completion is great. but when it suggests alternatives for standard types, the order puzzles me.
If I type "bool a = f" the code completion pops up, but "false" isn't even visible in the window. If I type "fa", "false" is there, but as the third alternative, after "faccessat" and "false_type". The problem is similar for "true".
If I type "int* p = n" the code completion pops up, but "nullptr" is nowhere to be seen. If I type "nu", it is still not there, but "nullopt", lots of "nullopt_t" variants and other non-ptr types are there. Adding 'l', so that I have "nul" finallly gives me "nullptr" as 6th choise, after "nullopt" and four "nullopt_t" variants.
"true", "false" and "nullptr" are probably the most used completions I need, so I really wish they could be the first suggestion, especially when completing for types of bool or pointer.
Do anyone know if there is a solution to this, or am I stuck with the way it is now?
Please sign in to leave a comment.
Hi! Thanks for your feedback. We already tried to address the same case here - https://youtrack.jetbrains.com/issue/CPP-22263. We gave higher priority to the items with the matching type. However it seems that if the function also returns bool than it still gets the first position. We will consider to give a special high priority to these 3 keywords because it's probably the right thing to do.