高亮目前是用了 mmm-mode
(setup mmm-mode
(:with-mode prog-mode (:hook (lambda()(:require mmm-mode))))
(:when-loaded
(:option mmm-parse-when-idle t
mmm-global-classes nil
mmm-classes-alist nil
mmm-mode-ext-classes-alist nil)
(:hook-into nxml-mode)
(mmm-add-classes
'((web-sql-select :submode sql-mode
:front "<select[^>]*>[ \t]*\n" :back "[ \t]*</select>")
(web-sql-insert :submode sql-mode
:front "<insert[^>]*>[ \t]*\n" :back "[ \t]*</insert>")
(web-sql-update :submode sql-mode
:front "<update[^>]*>[ \t]*\n" :back "[ \t]*</update>")
(web-sql-delete :submode sql-mode
:front "<delete[^>]*>[ \t]*\n" :back "[ \t]*</delete>")))
(mmm-add-mode-ext-class 'nxml-mode nil 'web-sql-select)
(mmm-add-mode-ext-class 'nxml-mode nil 'web-sql-insert)
(mmm-add-mode-ext-class 'nxml-mode nil 'web-sql-update)
(mmm-add-mode-ext-class 'nxml-mode nil 'web-sql-delete)))
但是好像并不能补全 sql 相关的关键字