This can be done by going to the Compile menu > Compile Option > Verilog & SystemVerilog tab > Language Syntax and setting it to "Use SystemVerilo".
This will add the option svlog =1 to the modelsim.ini file in the working folder and default to SystemVerilog.
However, even if you do not change the default, if you set the SystemVerilog file extension to .sv and use Nativelink, the vlog command for files with the sv extension will have the -sv option (an option to enable the SytemVerilog keyword), This eliminates the need for configuration on the ModelSim side.
Also, in ModelSim, if the file has the sv extension, it is automatically recognized as SystemVerilog and the SV keyword is enabled.
--------------------
Category: Simulation
Tools: ModelSim®
Devices: -