derekwyatt / vim-scala

My work on integration of Scala into Vim - not a ton here, but useful for me.
http://derekwyatt.org
Apache License 2.0
1.09k stars 144 forks source link

Set correct highlight group for escaped characters #164

Closed jsatk closed 3 years ago

jsatk commented 3 years ago

scalaEscapedChar should be set to Special, not Function.

To recreate the issue that this is fixing run:

echo "a\nb" > ~/foo.txt

Then use :setfiletype to change the filetype to various other languages like c, java, perl, python, ruby, javascript, and finally scala. Notice that the \n is a different color only in scala. It is the color used for functions and it is the only outlier here.

This commit fixes that.

Screenshot showcasing the issue

ches commented 3 years ago

Special appears to be the convention in syntaxes in the Vim distribution so LGTM 👍🏼