Add snippet to start prism-whitespace-mode for XML and YAML files
This commit is contained in:
parent
efab4c386e
commit
ebb9a7c949
16
gists.org
16
gists.org
|
@ -564,6 +564,22 @@ An improved version was [[https://github.com/xenodium/dwim-shell-command/commit/
|
|||
'my/not-applied))
|
||||
#+end_src
|
||||
|
||||
* Enable prism-whitespace-mode for XML and YAML
|
||||
|
||||
#+begin_src elisp :tangle gists/prism-xml-yaml.el
|
||||
;; Enable prism-whitespace-mode for YAML and XML automatically. Detect
|
||||
;; the amounh of whitespace from the respective mode.
|
||||
|
||||
(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))
|
||||
#+end_src
|
||||
|
||||
|
||||
* Meta
|
||||
** License
|
||||
|
||||
|
|
10
gists/prism-xml-yaml.el
Normal file
10
gists/prism-xml-yaml.el
Normal file
|
@ -0,0 +1,10 @@
|
|||
;; Enable prism-whitespace-mode for YAML and XML automatically. Detect
|
||||
;; the amounh of whitespace from the respective mode.
|
||||
|
||||
(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))
|
Loading…
Reference in a new issue