jcollard / elm-mode

Elm mode for emacs
GNU General Public License v3.0
376 stars 67 forks source link

How to turn off smart indentation? #129

Closed quetz closed 6 years ago

quetz commented 6 years ago

Using cycling based indentation is a real pain. It never does good thing and requires pressing tab at least once on every new line.

I tried turning it off as described in #61 but it does not work. Also tried:

Is there any other way of disabling it? I settled on manually removing elm-indent.el file and all references to it but it is kinda harsh solution.

purcell commented 6 years ago

In recent versions, you should use the following, after elm-mode.el is loaded: (remove-hook 'elm-mode-hook 'elm-indent-mode).

So put something like this in your start-up files:

(with-eval-after-load 'elm-mode
  (remove-hook 'elm-mode-hook 'elm-indent-mode))
quetz commented 6 years ago

Somehow it does not work if used inside dotspacemacs/user-init or dotspacemacs/user-config but putting it at top level worked fine.

Thanks!