From 4b108cbe7cd805318f7af97f878caabd2a813449 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 30 Apr 2020 10:30:01 +0200 Subject: emacs: added support for adoc-mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I've also restructured how markup languages were laid out in the document. Signed-off-by: Miquel Sabaté Solà --- .emacs.d/init.org | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 84d7a91..03859e6 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -2077,32 +2077,44 @@ Install =rust-mode= and add some hooks to make it friendlier. ** Other markup languages. -In here I put some markup languages which are not org. That is, markdown and YAML. I don't do anything crazy with YAML, but for Markdown I have =markdown-preview-mode=, which allows me to preview a markdown document into HTML live (in combination with =markdown-calibre=, which is the tool available for openSUSE). +In here I put some markup languages which are not org. I don't do anything crazy with YAML, I just install its support and add it the =warnings-mode= hook: #+BEGIN_SRC elisp - ;; Markdown mode with preview mode in the browser. - (use-package markdown-mode - :ensure t - :config +(use-package yaml-mode + :ensure t + :config - ;; This is the one that I got from openSUSE. - (custom-set-variables - '(markdown-command "/usr/bin/markdown-calibre")) + (add-hook 'yaml-mode-hook 'warnings-mode-hook)) +#+END_SRC - ;; Preview mode does its things through websockets, so it's a requirement. - ;; After that, we can safely require it. - (use-package websocket - :ensure t - :config - (use-package markdown-preview-mode - :ensure t))) +Same goes for =adoc= support: + +#+BEGIN_SRC elisp +(use-package adoc-mode + :ensure t + :config - ;; YAML - (use-package yaml-mode + (add-hook 'yaml-mode-hook 'warnings-mode-hook)) +#+END_SRC + +Now, for Markdown I have =markdown-preview-mode=, which allows me to preview a markdown document into HTML live (in combination with =markdown-calibre=, which is the tool available for openSUSE). + +#+BEGIN_SRC elisp +(use-package markdown-mode + :ensure t + :config + + ;; This is the one that I got from openSUSE. + (custom-set-variables + '(markdown-command "/usr/bin/markdown-calibre")) + + ;; Preview mode does its things through websockets, so it's a requirement. + ;; After that, we can safely require it. + (use-package websocket :ensure t :config - - (add-hook 'yaml-mode-hook 'warnings-mode-hook)) + (use-package markdown-preview-mode + :ensure t))) #+END_SRC ** Web-related stuff. -- cgit v1.2.3