Sorry, I'm new to emacs and I'm sure this is a very basic question.
For my personal projects I prefer spaces for indentation, whereas work requires smart-tabs (tabs for indentation, spaces for alignment).
I would like to create a
.dir-locals.el file in my work project root, so that whenever I open a C++ file it automatically switches to
indent-tabs-mode and turns on
This is what I have in my
.dir-locals.el file, but it is not working.
(defun my-c++-mode-setup() (use-package smart-tabs :config (smart-tabs-default-insinuations '(c c++))) (setq indent-tabs-mode . t) ) (add-hook 'c++-mode-hook 'my-c++-mode-setup)