branch: elpa/kotlin-mode
commit 8e4018e7a5f17199fff4f32f539408a534e4760f
Author: Remy Goldschmidt <[email protected]>
Commit: Remy Goldschmidt <[email protected]>
Added new keywords to kotlin-mode
---
kotlin-mode.el | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)
diff --git a/kotlin-mode.el b/kotlin-mode.el
index aeb9d859d4..594b601761 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -59,7 +59,7 @@
'("package" "import"))
(defconst kotlin-mode--type-decl-keywords
- '("class" "trait" "typealias"))
+ '("class" "trait" "typealias" "enum"))
(defconst kotlin-mode--fun-decl-keywords
'("fun"))
@@ -68,8 +68,14 @@
'("val" "var"))
(defconst kotlin-mode--statement-keywords
- '("if" "else" "try" "while" "do"
- "throw" "return" "continue" "break" "when" "is" "in"))
+ '(;; Branching
+ "if" "else"
+ ;; Exceptions
+ "try" "catch" "finally" "throw"
+ ;; Loops
+ "while" "for" "do" "continue" "break"
+ ;; Miscellaneous
+ "when" "is" "in"))
(defconst kotlin-mode--context-variables-keywords
'("this" "super"))
@@ -88,7 +94,8 @@
(defconst kotlin-mode--modifier-keywords
'("open" "private" "protected" "public"
- "override" "abstract" "final"))
+ "override" "abstract" "final"
+ "annotation" "internal" "in" "out"))
(defconst kotlin-mode--property-keywords
'("by" "get" "set"))
@@ -146,19 +153,6 @@
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)
-
;; Properties
;; by/get/set are valid identifiers being used as variable
;; TODO: Highlight keywords in the property declaration statement