diff --git a/pygments/lexers/jvm.py b/pygments/lexers/jvm.py index 2736329d94..1dab164fad 100644 --- a/pygments/lexers/jvm.py +++ b/pygments/lexers/jvm.py @@ -1027,7 +1027,7 @@ class KotlinLexer(RegexLexer): name = 'Kotlin' aliases = ['kotlin'] - filenames = ['*.kt'] + filenames = ['*.kt', '*.kts'] mimetypes = ['text/x-kotlin'] flags = re.MULTILINE | re.DOTALL | re.UNICODE @@ -1049,6 +1049,7 @@ class KotlinLexer(RegexLexer): (r'\s+', Text), (r'\\\n', Text), # line continuation (r'//.*?\n', Comment.Single), + (r'^#!/.+?\n', Comment.Single), # shebang for kotlin scripts (r'/[*].*?[*]/', Comment.Multiline), (r'""".*?"""', String), (r'\n', Text),