evincarofautumn / kitten

A statically typed concatenative systems programming language.
http://kittenlang.org/
Other
1.1k stars 42 forks source link

Update Vim syntax highlighting. #126

Closed evincarofautumn closed 10 years ago

evincarofautumn commented 10 years ago

Waiting for a Vim user to test & sign off.

strager commented 10 years ago

It may be useful to make a file dedicated to trying out syntaxy stuff for testing purposes. =]

->, ?, +, and other operators (in type signatures and in function bodies) are coloured as a keyword. They should be coloured as operators, which I believe is the same as body text. []() are fine. I think -> is a special case operator, though that may not matter if operators are the same as body text.

\ is coloured as body text, but should be coloured as something else. (It shows up as a cyan in Haskell code for me, for example.)

, is coloured as a keyword, but should definitely be coloured as body text.

The .~: (no clue what that is; looks stupid!) operator has the .~ coloured as a keyword (see above) but the : is coloured as body text.

Runes literals (e.g. 'x') are coloured as whatever their colour would be without the quotes. In other words, it seems highlighting of rune literals is unimplemeted.

char, int, etc. (built-in types) should be coloured differently. (Built-ins are coloured differently in C code, for example.) I think you should colour them the same as you colour UpperCamelCase type names, and possibly UpperCamelCase type names should be deemphasized (debatable).

\n, \\, etc. in string literals ("hello") and rune literals ('x') should be coloured differently (red on my setup) to stand out.

The enclosing quotes in string literals are coloured the same as the string contents, but the enclosing quotes in rune literals are coloured as body text. The quotes should be coloured the same as the contents of the quoted text. (In other words, the colouring of strings is correct, and the colouring of runes is incorrect.)

\a, \b, \f, etc. is coloured differently for some reason (outside string literals). For example:

\add
0123
\drop
45678

characters 0 and 1 are coloured oddly, and characters 2-8 are coloured the same. Characters 2-9 are correct.

The . in a decimal number (e.g. 12.34) is coloured as body text, but should be coloured the same as the number. (Maybe I don't know the syntax of Kitten, so I could be wrong.)

The colouring of keywords and true and false are all correct.