branch: elpa/kotlin-mode
commit c6207be61303753e925f7d9aa263d219a4a8e89b
Author: Shodai Yokoyama <[email protected]>
Commit: Shodai Yokoyama <[email protected]>
kotlin-mode: Add kotin-mode--syntax-propertize-function
---
kotlin-mode.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/kotlin-mode.el b/kotlin-mode.el
index 86760cc163..6b9c2e982a 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -199,6 +199,20 @@
(match-data))))
)
+(defun kotlin-mode--syntax-propertize-function (start end)
+ (let ((case-fold-search))
+ (goto-char start)
+ (remove-text-properties start end '(kotlin-property--interpolation))
+ (funcall
+ (syntax-propertize-rules
+ ((let ((identifier '(any alnum " !%&()*+-./:<>?[]^_|~")))
+ (rx-to-string
+ `(or (group "${" (* ,identifier) "}")
+ (group "$" (+ ,identifier)))))
+ (0 (ignore (kotlin-mode--syntax-propertize-interpolation)))))
+ start end))
+ )
+
(define-derived-mode kotlin-mode prog-mode "Kotlin"
"Major mode for editing Kotlin."