If I go to scratch, M-x web-mode RET, type in this snippet:

<script type="text/x-dust-template">
    {prop} <----- this should indent

What am I doing wrong here? I see bugs with Dust.js have been solved and I can't be the only one doing simple stuff like this without noticing this indentation behaviour.

Also having problems with the general indentation of HTML, sometimes I get a TAB, sometimes I get two spaces, sometimes one space, who knows what else I can get but it is at least consistent so TAB or spaces are always the same for every line that I indent.

I just want one TAB per identation and properly indented Dust, can somebody help me?

1 Answer 1


I had a similar problem getting web-mode to play nice with Django templates. For me the fix was as simple as adding the following to my init file:

(setq web-mode-engines-alist
  '(("django"    . "\\.html\\'"))

For you, try adding something like:

(setq web-mode-engines-alist
  '(("dust"    . "\\.html\\'"))

For more details, see the section Associate an engine in the web-mode docs.

  • Works on my laptop at home, I have to check at work if this fixes stuff!
    – user12968
    Aug 14, 2016 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.