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

Interpreting the empty line to be on the same level as surrounding statements #16

Open
moll opened this issue Oct 10, 2020 · 0 comments

Comments

@moll
Copy link

moll commented Oct 10, 2020

Hey,

Thank you for taking the time to maintain IndentWise! I noticed empty lines seem to be interpreted as lacking any indentation. What do you think of instead interpreting empty lines as being on the same level as the surrounding statements? For example, given a hypothetical Haskell source file with the cursor at | (line 4):

describe "foo" $ do
  it "x" $
    return ()
|
  it "y" $
    return ()

  it "z" $
    return ()

describe "bar" $
  return ()

What about having the "jump to previous/next equal indent" functions, instead of jumping to "describe bar", jump to "it x" or "it y" respectively? I reckon for that it'd need to first look forward to identify the indent level of the next non-blank line, and then either stay there or go backwards.

Thanks!

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

1 participant