From 0a900d06a2a8851715e206fc0c2ff17eb9f63b5a Mon Sep 17 00:00:00 2001 From: Paolo Gavocanov Date: Fri, 22 Dec 2017 10:01:58 +0100 Subject: [PATCH] vimlint, add operators, use hi link def --- ftplugin/kotlin.vim | 2 +- indent/kotlin.vim | 2 +- syntax/kotlin.vim | 74 ++++++++++++++++++++++----------------------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/ftplugin/kotlin.vim b/ftplugin/kotlin.vim index 853b1d0..95b5655 100644 --- a/ftplugin/kotlin.vim +++ b/ftplugin/kotlin.vim @@ -1,4 +1,4 @@ -if exists("b:did_ftplugin") | finish | endif +if exists('b:did_ftplugin') | finish | endif let b:did_ftplugin = 1 setlocal comments=:// diff --git a/indent/kotlin.vim b/indent/kotlin.vim index b487973..821ee6f 100644 --- a/indent/kotlin.vim +++ b/indent/kotlin.vim @@ -3,7 +3,7 @@ " Maintainer: Alexander Udalov " Latest Revision: 15 July 2017 -if exists("b:did_indent") +if exists('b:did_indent') finish endif let b:did_indent = 1 diff --git a/syntax/kotlin.vim b/syntax/kotlin.vim index b7f8da8..b6478c3 100644 --- a/syntax/kotlin.vim +++ b/syntax/kotlin.vim @@ -3,11 +3,11 @@ " Maintainer: Alexander Udalov " Latest Revision: 14 January 2019 -if exists("b:current_syntax") +if exists('b:current_syntax') finish endif -let b:current_syntax = "kotlin" +syn match ktOperator "\([-!%&\*\+./<=>\?\\^|:]\)" syn keyword ktStatement break continue return syn keyword ktConditional if else when @@ -65,48 +65,48 @@ syn match ktEscapedName "\v`.*`" syn match ktExclExcl "!!" syn match ktArrow "->" +hi def link ktStatement Statement +hi def link ktConditional Conditional +hi def link ktRepeat Repeat +hi def link ktOperator Operator +hi def link ktKeyword Keyword +hi def link ktException Exception +hi def link ktReservedKeyword Error +hi def link ktInclude Include -hi link ktStatement Statement -hi link ktConditional Conditional -hi link ktRepeat Repeat -hi link ktOperator Operator -hi link ktKeyword Keyword -hi link ktException Exception -hi link ktReservedKeyword Error +hi def link ktType Type +hi def link ktModifier StorageClass +hi def link ktStructure Structure +hi def link ktTypedef Typedef -hi link ktInclude Include +hi def link ktBoolean Boolean +hi def link ktConstant Constant -hi link ktType Type -hi link ktModifier StorageClass -hi link ktStructure Structure -hi link ktTypedef Typedef +hi def link ktTodo Todo +hi def link ktShebang Comment +hi def link ktLineComment Comment +hi def link ktComment Comment +hi def link ktCommentMatchGroup Comment +hi def link ktDocComment Comment +hi def link ktDocTag Special +hi def link ktDocTagParam Identifier -hi link ktBoolean Boolean -hi link ktConstant Constant +hi def link ktSpecialChar SpecialChar +hi def link ktSpecialCharError Error +hi def link ktString String +hi def link ktCharacter Character -hi link ktTodo Todo -hi link ktShebang Comment -hi link ktLineComment Comment -hi link ktComment Comment -hi link ktCommentMatchGroup Comment -hi link ktDocComment Comment -hi link ktDocTag Special -hi link ktDocTagParam Identifier +hi def link ktAnnotation Identifier +hi def link ktLabel Identifier -hi link ktSpecialChar SpecialChar -hi link ktSpecialCharError Error -hi link ktString String -hi link ktCharacter Character +hi def link ktSimpleInterpolation Identifier +hi def link ktComplexInterpolationBrace Identifier -hi link ktAnnotation Identifier -hi link ktLabel Identifier +hi def link ktNumber Number +hi def link ktFloat Float -hi link ktSimpleInterpolation Identifier -hi link ktComplexInterpolationBrace Identifier +hi def link ktExclExcl Special +hi def link ktArrow Structure -hi link ktNumber Number -hi link ktFloat Float - -hi link ktExclExcl Special -hi link ktArrow Structure +let b:current_syntax = 'kotlin'