This is more or less a question of putting the answer from Make web-mode always indent with spaces into the
I want to set tab indent to 2 spaces, and use the spaces throughout the lines, even when reaching 8 spaces etc.
This is my effort so far, I've tried both
setq-default, and I've tried to put the init code in either
:init, but it's not working. When I "describe variable", tab-width is always 8 in the
.go file that I'm opening.
(use-package go-mode :mode "\\.go\\'" :config (progn (setq-default tab-width 2) (setq-default indent-tabs-mode nil) ;; tab-width & indent-tabs-mode are both buffer-local so need setq-default ) :init (progn (setq-default tab-width 2) (setq-default indent-tabs-mode nil) ) )