bram85's Blog

bram85's Avatar Image
Tooting mostly about #emacs.
← All posts

Enable prism-whitespace-mode automatically for XML and YAML files, and detect amount of whitespace per indentation level:

(use-package prism
  :config
  (add-to-list 'prism-whitespace-mode-indents '(yaml-mode . yaml-indent-offset))
  (add-to-list 'prism-whitespace-mode-indents '(nxml-mode . nxml-child-indent))
  :hook
  (yaml-mode . prism-whitespace-mode)
  (nxml-mode . prism-whitespace-mode)) 

As usual, embed accordingly in your own init.el.

https://apps.bram85.nl/git/bram/gists/src/commit/ebb9a7c949553e8442cbb4810ce13e8e909abac1/gists/prism-xml-yaml.el

#emacs

To like or reply, open original post on Emacs.ch