C/C++ intellisense fails for this board in Mbed Studio because this board supports only Mbed OS 2 (NUCLEO-F302R8 | Mbed). Mbed Studio is designed to work with Mbed OS 5.12.0 and higher.
To enable support for this board you can try using bare metal profile. More information about it can be found here: https://os.mbed.com/docs/mbed-studio/current/mbed-os/bare-metal.html
I install bare metal with the procedure in the readme of Mbed-Cli and after when I open Mbed studio, I have the possibility to use the exemple “blink with bare metal”. I try it and works fine in my STM32F302R8.
$ mbed new mbed-os-program
[mbed] Creating new program "mbed-os-program" (git)
[mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at latest revision in the current branch
[mbed] Updating reference "mbed-os" -> "https://github.com/ARMmbed/mbed-os/#89962277c20729504d1d6c95250fbd36ea5f4a2d"
This creates a new folder “mbed-os-program”, initializes a new repository and imports the latest revision of the mbed-os dependency to your program tree.
Creating a new program for Mbed OS 2
Mbed CLI is also compatible with Mbed OS 2 programs based on the Mbed library, and it automatically imports the latest Mbed library release if you use the --mbedlib option:
in a terminal :
$ mbed new mbed-classic-program --mbedlib
[mbed] Creating new program "mbed-classic-program" (git)
[mbed] Adding library "mbed" from "https://mbed.org/users/mbed_official/code/mbed/builds" at latest revision in the current branch
[mbed] Downloading mbed library build "f9eeca106725" (might take a minute)
[mbed] Unpacking mbed library build "f9eeca106725" in "D:\Work\examples\mbed-classic-program\mbed"
[mbed] Updating reference "mbed" -> "https://mbed.org/users/mbed_official/code/mbed/builds/f9eeca106725"
[mbed] Couldn't find build tools in your program. Downloading the mbed 2.0 SDK tools...