It could be the GPIO driver is not enabled. I've ran into the same problem.
I would check to see if the stm32c5xx_hal_gpio.c file is grayed out (not enabled).
I'm not sure if CubeMX2 is supposed to add defines/symbols automatically or if it's a bug, but I have to enable each peripheral even though i enabled them in CubeMX2.
For instance, stm32c5xx_hal_gpio.c HAL driver, it's all grayed out. The right column shows all the functions have a slash.

When I add "GPIOC" which is a one of the symbols, it enables the whole file. I have to add symbols for other peripherals as well.

You can see it's not grayed out and in the right column, the slashes are gone.

Now I am able to type a few characters and hit CTRL + Space to bring up a list of available functions.
If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source