_quarto.yml in the r root directory ( the one with .Rproj)
add the line fully left justified
editor: source # or visual
This will affect the whole project. If you want to affect just one file out "editor: source" in the yaml fully left justified