branch: elpa/kotlin-mode
commit c91a82b86471d663497d4cc76553581e3facd0de
Author: Shodai Yokoyama <[email protected]>
Commit: Shodai Yokoyama <[email protected]>

    kotlin-mode: Highlight try-`catch-finally'
---
 kotlin-mode.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index 72582fe610..5c447063bf 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -143,6 +143,19 @@
              eow)
        t)
      1 font-lock-keyword-face)
+
+    ;; try-catch-finally
+    ;; `catch' and `finally' are valid identifier being used as variable
+    (,(rx-to-string
+       `(and bow (group "catch") eow
+             (* space) (*? anything) "{" )
+       t)
+     1 font-lock-keyword-face)
+    (,(rx-to-string
+       `(and bow (group "finally") eow
+             (*? (or space ?\n)) "{")
+       t)
+     1 font-lock-keyword-face)
     )
   "Default highlighting expression for `kotlin-mode'"
   )

Reply via email to