Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indentation issue #16

Closed
umnikos opened this issue Aug 31, 2018 · 2 comments
Closed

Indentation issue #16

umnikos opened this issue Aug 31, 2018 · 2 comments

Comments

@umnikos
Copy link

umnikos commented Aug 31, 2018

Hello! I'm new to haskell. Great plugin, but I have an issue with indentation. I have this code:

fizzbuzz = map fizzbuzzify [1..]
  where fizzbuzzify n = if words == "" then show n else words
         where words = "" ++
                (if mod n 3 == 0 then "Fizz" else "") ++
                (if mod n 5 == 0 then "Buzz" else "")

(which I indented myself) but when I type it into vim while using the plugin I get this:

fizzbuzz = map fizzbuzzify [1..]
  where fizzbuzzify n = if words == "" then show n else words
          where words = "" ++
                (if mod n 3 == 0 then "Fizz" else "") ++
                (if mod n 5 == 0 then "Buzz" else "")

The indentation of the code in parens is not indented far enough and haskell doesn't compile. I tried with both 4-space tabs and 2-space tabs. Help?

Edit: The indentation is initially correct when I press enter, but it messes itself up when I then type a (

itchyny added a commit that referenced this issue Aug 31, 2018
@itchyny
Copy link
Owner

itchyny commented Aug 31, 2018

I think the case is fixed in the latest version.

@umnikos
Copy link
Author

umnikos commented Aug 31, 2018

It is indeed fixed. Closing this issue

@umnikos umnikos closed this as completed Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants