0

I want to write AsciiDoc documents in Emacs (more specifically Doom Emacs) with syntax highlighting.

I've tried:

  • Adding (package! adoc-mode) to the bottom of ~/.doom.d/packages.el .
  • Adding adoc-mode to ~/.doom.d/init.el
  • Running ~/.emacs.d/bin/doom sync

But I still get no syntax highlighting.

Syntax highlighting for Markdown and Org-mode do work, not sure if I did something to enable that or if it worked out of the box.

Edit

Running emacs with the -Q or --quick option (emacs -Q) org-mode has highlighting but markdown does not.

4
  • 1
    You can always check if something "works out of the box" by starting with emacs -Q.
    – NickD
    Commented Dec 19, 2022 at 15:50
  • @NickD With emacs -Q org-mode has highlighting but markdown does not. Commented Dec 19, 2022 at 15:55
  • 1
    Please add all this information to the question (if it is relevant). The question should stand alone and contain all the relevant information, even if the comment is deleted.
    – NickD
    Commented Dec 19, 2022 at 15:58
  • Just for future reference the second step listed is not necessary, only adding it to packages.el and running doom sync is necessary to get it installed.
    – zzantares
    Commented May 28, 2023 at 22:33

1 Answer 1

0

Just made an account to answer this question!

You probably already solved it, but for anyone else passing by with the same question (and are using Doom Emacs), put (add-to-list 'auto-mode-alist (cons "\\.adoc\\'" 'adoc-mode)) in your config.el file.

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.