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

Fold select, switch, case #164

Merged
merged 1 commit into from Nov 8, 2018

Conversation

Projects
None yet
3 participants
@Ben3eeE
Member

Ben3eeE commented Nov 8, 2018

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Fixes #163 by adding fold rules for switch, select and case.

Alternate Designs

N/A

Benefits

Can fold select switch and case

Possible Drawbacks

Someone wants to be unable to fold these things

Applicable Issues

Fixes #163

/cc: @maxbrunsfeld

@Ben3eeE

This comment was marked as resolved.

Member

Ben3eeE commented Nov 8, 2018

Edit: nevermind this doesn't make sense because then the entire else { would be on the same line as well.

While testing this I noticed that if else and if else if doesn't fold correctly:

if else
image

if
image

Code from https://gobyexample.com/if-else

I would expect both cases to fold the same way but it doesn't. I have idea how to fix this.

@maxbrunsfeld maxbrunsfeld merged commit 0010d17 into master Nov 8, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@maxbrunsfeld maxbrunsfeld deleted the b3-go-folding branch Nov 8, 2018

@maxbrunsfeld

This comment has been minimized.

Contributor

maxbrunsfeld commented Nov 8, 2018

📈

@Toasa

This comment has been minimized.

Toasa commented Nov 8, 2018

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment