forked from NixOS/nix-mode
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nix-mode-mmm.el
32 lines (24 loc) · 841 Bytes
/
nix-mode-mmm.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;;; nix-mode-mmm.el --- Support for MMM in nix-mode -*- lexical-binding: t -*-
;; Author: Matthew Bauer <mjbauer95@gmail.com>
;; Homepage: https://github.com/NixOS/nix-mode
;; Keywords: nix
;; Version: 1.5.0
;; Package-Requires: ((emacs "24.3") (mmm-mode "0.5.8"))
;; This file is NOT part of GNU Emacs.
;;; Commentary:
;;; Code:
(require 'mmm-mode)
(mmm-add-group 'nix-sh
'((sh-command
:submode sh-mode
:face mmm-output-submode-face
:front "[^'a-zA-Z]''[^']"
:back "''[^$\\']"
:include-front t
:front-offset 4
:end-not-begin t
)))
;; (setq mmm-global-mode 'maybe)
(mmm-add-mode-ext-class 'nix-mode "\\.nix\\'" 'nix-sh)
(provide 'nix-mode-mmm)
;;; nix-mode-mmm.el ends here