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

Better auto indentation #223

Open
SmartHypercube opened this issue Feb 8, 2023 · 2 comments
Open

Better auto indentation #223

SmartHypercube opened this issue Feb 8, 2023 · 2 comments

Comments

@SmartHypercube
Copy link

a = do
    let b = do
            -- cursor should go here
        -- not here

In the example, let can be changed to where, do can be changed to case x of. There may be more such combinations to consider.

@JustusAdam
Copy link
Owner

I don't think I quite understand what your issues is. Are you saying that where the cursor currently goes does not compile?

@SmartHypercube
Copy link
Author

Yes. This won't compile:

a = do
    let b = do
        pure ()

pure () needs to be indented one more level.

Currently, after hitting enter, the cursor goes here:

a = do
    let b = do
        |

And as far as I know, the only legal next move at this state is to press tab. Inserting anything else will certainly result in a syntax error. So I think the auto indentation rule is wrong.

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