Some syntax highlighting for haml-mode. Yay!
Thanks to Dmitry Galinsky! git-svn-id: svn://hamptoncatlin.com/haml/trunk@429 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
e8e0cf6408
commit
827aaa31d7
|
@ -54,6 +54,15 @@
|
|||
"Prepends a Haml-tab-matching regexp to str."
|
||||
(concat "^\\(" (string-* " " haml-indent-offset) "\\)*" str))
|
||||
|
||||
;; Font lock
|
||||
(defconst haml-font-lock-keywords-1
|
||||
(list
|
||||
'("%\\w+" . font-lock-function-name-face)
|
||||
'("#\\w+" . font-lock-keyword-face)
|
||||
'("= .*" . font-lock-string-face)
|
||||
'("[ \t]*- .*" . font-lock-string-face)
|
||||
'("!!!" . font-lock-constant-face)))
|
||||
|
||||
;; Constants
|
||||
|
||||
(defconst haml-mode-version "0.0.1" "Version of `haml-mode.'")
|
||||
|
@ -108,7 +117,12 @@
|
|||
|
||||
\\{haml-mode-map}"
|
||||
(set (make-local-variable 'indent-line-function) 'haml-indent-line)
|
||||
(set (make-local-variable 'font-lock-defaults) '(sample-font-lock-keywords)))
|
||||
(set (make-local-variable 'font-lock-defaults) '(sample-font-lock-keywords))
|
||||
(make-local-variable 'font-lock-defaults)
|
||||
(setq font-lock-defaults
|
||||
'((haml-font-lock-keywords-1)
|
||||
nil
|
||||
t)))
|
||||
|
||||
;; Indentation and electric keys
|
||||
|
||||
|
|
Loading…
Reference in New Issue