1

I use ESS in Emacs for R development. No matter for what programming language (R, Rust, Python, etc.) I always set 4 spaces as a tab via a general setting in my Emacs init file :

(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)

Recently I had to upgrade to a new Emacs version and I reinstalled everything. Apparently in the latest version of lintr package, there is a control to check wether tabs are two spaces. Given that my Emacs init configuration inserts 4 spaces for tabs, I get loads of warning messages in my R programs:

[indentation lintr] : Indentation should be 2 spaces but is 4 spaces.

I was reading "Using lintr". It seems that by adding a hidden file named .lintr in my HOME directory I might be able to change the default settings and set tabs as 4 spaces. However I didn't find the specific variable in the documentation to achieve this and don't really understand what I should put in that file (both variable and syntax I mean)

I appreciate if you could kindly make some clarification.

user17911
  • 1,073
  • 1
  • 8
  • 18

0 Answers0