lang/lua: improve moonscript & love2D support
- Fix moonscript-mode not highlighting/treating single-quoted strings as strings - Fontify interpolated expressions in moonscript-mode strings (PR upstream?) - Fix +lua-love-mode project detection - Fix +lua/run-love-game love project root resolution
This commit is contained in:
parent
74877edd5d
commit
1f0a5f04f2
4 changed files with 66 additions and 32 deletions
16
modules/lang/lua/autoload/moonscript.el
Normal file
16
modules/lang/lua/autoload/moonscript.el
Normal file
|
@ -0,0 +1,16 @@
|
|||
;;; lang/lua/autoload/moonscript.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +moonscript)
|
||||
|
||||
;;;###autoload
|
||||
(defun +lua|moonscript-fix-single-quotes ()
|
||||
"Single-quoted strings aren't treated as strings."
|
||||
;; (modify-syntax-entry ?\" "\"" moonscript-mode-syntax-table)
|
||||
(modify-syntax-entry ?\' "\"" moonscript-mode-syntax-table))
|
||||
|
||||
;;;###autoload
|
||||
(defun +lua|moonscript-fontify-interpolation ()
|
||||
"Highlight interpolated expressions in moonscript strings."
|
||||
(font-lock-add-keywords
|
||||
nil '(("#{\\([^}]+\\)}"
|
||||
(0 font-lock-preprocessor-face t)
|
||||
(1 nil t)))))
|
Loading…
Add table
Add a link
Reference in a new issue