Html.eex mode for emacs?

I am a Spacemacs user. I still have not found a good mode for html.eex files. I’ve been using web-mode but the indentation gets crazy sometimes. Does anyone have any suggestions? Thanks.

1 Like

I am interested as well

Hey @slouchpie, I’ve been using mmm mode to switch between mhtml and elixir mode, perhaps this would be better than your current setup? :+1:

(require-package 'mmm-mode)

(require 'mmm-defaults)

(setq mmm-global-mode 'auto
      mmm-submode-decoration-level 0
      mmm-parse-when-idle t)

(add-to-list 'auto-mode-alist '("\\.html.eex\\'" . mhtml-mode))
(add-to-list 'auto-mode-alist '("\\.html.leex\\'" . mhtml-mode))

    :submode elixir-mode
    :face mmm-declaration-submode-face
    :front "<%[#=%]*" ;; regex to find the opening tag
    :back "%>"))) ;; regex to find the closing tag

(mmm-add-mode-ext-class 'mhtml-mode nil 'eex-elixir)

require-package is not seen as valid function by spacemacs. Is there some layer I need to install to get require-package to work?

You can install the package manually if needed, and call require instead.