jcollard / elm-mode

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

Indent tab cycling not working as expected for me #174

Closed Pilgrim1379 closed 3 years ago

Pilgrim1379 commented 3 years ago

elm-mode indentation is based on cycling: every time you insert a new line there will be one or more indentation levels available for you to choose from. The exact number is printed in the minibuffer either as Sole indentation or Indent cycle (n)... where n is the number of available indentations to choose from. If the automatic indentation level was not the one you expected simply hit TAB to cycle through the list (note that hitting any other key will cancel the cycle).

I'm using doom emacs and I have zero additional elm config in my config.el file. According to the above, what I expect is, when I enter a new line and the indent cycle (n) shows in the status line (and without touching any key prior), I can hit the TAB key to cycle through to find the right indent level for my purpose.

However, what happens for me is, when I hit TAB first time, nothing happens i.e. cursor doesn't move. Then subsequent TABs just keep moving the cursor along without cycling.

purcell commented 3 years ago

Please post what command TAB is bound to in that buffer: C-h k TAB should tell you this. Generally it should be bound to the default (indent-for-tab-command) or a well-behaved replacement (e.g. company-indent-or-complete-common). Most likely explanation is that Spacemacs is doing something clever which accidentally subverts the correct behaviour.

Pilgrim1379 commented 3 years ago

Ah! it's bound to better-jumper-jump-forward. Never even heard of that before. How do I overwrite that behaviour?

purcell commented 3 years ago

That's a bit out of scope for discussion here, sorry, I'm not familiar with Spacemacs' config: best to ask there.