1. 下载Kotlin compiler
下载地址: https://github.com/JetBrains/kotlin/releases/tag/v1.3.21, 进入网页,找到kotlin compiler, 点击下载,解压
并把kotlin.bat所在目录(Kotlin compiler\kotlinc\bin)加入环境变量
2.设置配置文件
打开sublime text 3, tool--build system--new build system, 设置配置文件:
{
"cmd": ["kotlinc","$file_name","-include-runtime","-d","${file_base_name}.jar","&&", "java","-jar", "${file_base_name}.jar"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.Konlin",
"shell":true
}
命名为kotlin, 保存
3. 代码高亮
sublime text 3中, 点击references -> Brownser Package , 找到下载的.zip文件