Can I get 2 spaces in Shiny source files?

I much prefer 2 spaces to 4 in my source code. RStudio allows me to set this, but it seems to outright ignore me when one of those files happens to be named ui.R or server.R, for example. Is there any way to stop rstudio from making me have 4 spaces when creating shiny apps?