udalov / kotlin-vim

Kotlin plugin for Vim. Featuring: syntax highlighting, basic indentation, Syntastic support
Apache License 2.0
630 stars 52 forks source link

Highlighting for KDoc #22

Closed sciencesakura closed 5 years ago

sciencesakura commented 5 years ago

I added a syntax highlighting for KDoc tags.

udalov commented 5 years ago

Thank you for the contribution! I've merged your commit but made a few changes: 1) Excluded ktDocTag and ktDocTagParam from the ktComplexInterpolation region. Otherwise any whitespace followed by a non-whitespace in a string interpolation expression (" ... ${ abc } ... ") was recognized as a kdoc tag parameter, and the string interpolation region apparently could not end because of it, which broke the highlighting completely. 2) Made @see and @sample kdoc tags accept a parameter too. 3) Simplified regexes somewhat.