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

Option similar to ruby_indent_assignment_style #42

Open
cvincent opened this issue Oct 12, 2017 · 2 comments
Open

Option similar to ruby_indent_assignment_style #42

cvincent opened this issue Oct 12, 2017 · 2 comments

Comments

@cvincent
Copy link

The Ruby Vim plugin includes an option called ruby_indent_assignment_style which determines the behavior of indenting after an assignment, commonly with begin, if, etc. Two different styles are shown below, each of which is supported by this option:

@var = if some_condition
  true
else
  false
end

###

@var = if some_condition
         true
       else
         false
       end

I greatly prefer the first style, but vim-crystal only appears to support the latter style. I'd love to see this option added.

@rhysd
Copy link
Member

rhysd commented Oct 13, 2017

I agree that the feature looks useful. But it should be provided by formatter because vim-crystal uses official formatter to format source code. Could you request it in crystal repo? When the feature is added to the formatter, vim-crystal would automatically gain the feature.

@cvincent
Copy link
Author

Done: crystal-lang/crystal#5134

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