Skip to content

Fix case of multiple 'do' blocks on the same line #36

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

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

mateoxh
Copy link
Contributor

@mateoxh mateoxh commented Mar 1, 2025

No description provided.

@@ -128,7 +128,8 @@ function! GetHaskellIndent() abort
endif

if nonblankline =~# '\v<do>\s*[[:alnum:](]'
return match(nonblankline, '\v<do>\s*\zs\S')
let i = strridx(nonblankline, 'do ')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work with something like do foo <- do undo <- f?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it doesn't. I fixed it now, thanks.

@mateoxh
Copy link
Contributor Author

mateoxh commented Mar 3, 2025

I wonder if there is a way to indent the cursor to the previous do-block when pressing <CR> two times.

@itchyny
Copy link
Owner

itchyny commented Mar 4, 2025

Thank you.

I wonder if there is a way to indent the cursor to the previous do-block when pressing two times.

That would be interesting to implement, but try in a separate one.

@itchyny itchyny merged commit 16c5e41 into itchyny:master Mar 4, 2025
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants