I have a C codebase with a lot of #define'd constants, and I consistently have a lot of trouble with YCM completing them. Based on some debugging, I suspect it is a clangd issue, not a YCMd one (I enabled verbose logging on clangd and snooped the logs, and it's not returning the results -- though I don't really know much past that).
In particular, it seems to not do proper fuzzy subsequence matching, only prefix matching (but the behavior is somewhat inconsistent).
For example, if I have a header file that say,
extern int RSV_PTE_WTEST;
#define RSV_PTE_WRITE 5
In my source file, if I trigger completion after RSV_PTE_W, I will get both results back. However if I trigger completion after PTEW, I only get RSV_PTE_WTEST (the extern int), not the #define.
Anyone have suggestions for working around this?
Thanks,
Andrew