At this time the only way to detect that your computer is under attack by a ransomware virus, is using a trap.
You can use Honey jar trap to place a trap file like MyImportantWordFile.bac in a directory called MyImportantBackupFiles.
This trap will most certainly get the attention of a ransomware virus that is attacking your computer.
When you setup Honey jar trap you can set the interval at which the software will check, if trap files are altered or deleted. And when a ransomware virus has altered your trap file, you will be notified.
Some other files may already have been encrypted and they can only be resqued by a backup. So a trap is not perfect but not using a trap would mean all your files would become inaccessible to you.