purescript-contrib / purescript-vim

Syntax highlighting and indentation for PureScript
BSD 2-Clause "Simplified" License
154 stars 35 forks source link

indentation: fix some issues #20

Closed coot closed 7 years ago

coot commented 7 years ago

Indent function declaration correctly (no indent)

f :: String -> String
f

but indent if it's a type declaration

f :: String
  -> String
coot commented 7 years ago

And also fix a small syntax highlighting issue.

coot commented 7 years ago

@arthur-xavier could you test the syntax highlighting for type declarations in let and where clauses. Hopefully there is no regression anywhere else. Modifying vim syntax is always tricky :/

arthurxavierx commented 7 years ago

Sorry for the late response; I had a really busy weekend and needed some spare time to look into this. Seems all right to me, couldn't detect any regressions. I tested against lots of source files both the syntax and the indent definitions (I lost my SyntaxTest.purs… Should've put it in the repo I guess).

I noticed, however, a few problems with class, instance declarations and arrow operators (both type and term-level). I checked but these problems didn't come with any of your changes and they also didn't happen before. The color scheme I use also had no updates on PureScript syntax. I guess it must be a Vim thing or I don't know. Anyway, I'll file some issues and see if I can work on them later; or you if you'd like to.

Thanks for the help! :)

coot commented 7 years ago

That ok, i had time to catch all kinks.

Do you mean some problems with highlighting? I haven't followed vim dev closely, so it's hard to say.

arthurxavierx commented 7 years ago

Yes. The one I'm sure there wasn't before is where arrow operators (<- and -> both in type- and term-level) aren't getting highlighted. There was one with multiparameter type classes I had to fix but didn't create an issue and another one in instance heads of which I'm not sure it happened before.