From 9a8e5f886bb8f653abf1c42ac517fa709acbd874 Mon Sep 17 00:00:00 2001 From: ice1000 Date: Thu, 19 Apr 2018 01:00:58 +0800 Subject: [PATCH] Done. --- src/com/tang/intellij/devkt/lua/lua-devkt.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/com/tang/intellij/devkt/lua/lua-devkt.kt b/src/com/tang/intellij/devkt/lua/lua-devkt.kt index 865b4c0..ab81b92 100644 --- a/src/com/tang/intellij/devkt/lua/lua-devkt.kt +++ b/src/com/tang/intellij/devkt/lua/lua-devkt.kt @@ -44,10 +44,14 @@ class EmmyLua : ExtendedDevKtLanguage( super.annotate(element, document, colorScheme) when (element) { is LuaFuncDef -> function(element, document, colorScheme) - is LuaLocalDef -> { - element.nameList?.run { nameDefList.forEach { - document.highlight(it, colorScheme.variable) - } } + is LuaLocalDef -> localVar(element, document, colorScheme) + } + } + + private fun localVar(element: LuaLocalDef, document: AnnotationHolder, colorScheme: ColorScheme) { + element.nameList?.run { + nameDefList.forEach { + document.highlight(it, colorScheme.variable) } } }