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

Parentheses are not added to function calls #48

Open
jonleighton opened this issue May 11, 2021 · 1 comment
Open

Parentheses are not added to function calls #48

jonleighton opened this issue May 11, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@jonleighton
Copy link

This function call doesn't get formatted:

<%= foo "bar" %>

I think I would ideally expect the formatting to happen exactly as mix format does, which would mean this:

<%= foo("bar") %>

Ideally it would also obey formatting configuration in .formatter.exs.

Perhaps it's not such a good idea for templates though. There are probably a lot of template helpers that feel cleaner without the parens. So the current behaviour doesn't hugely offend me, but I thought I'd open an issue for discussion about what the desired behaviour should be here.

@jonleighton jonleighton changed the title Parentheses are not added Parentheses are not added to function calls May 11, 2021
@adamzapasnik adamzapasnik added the enhancement New feature or request label May 16, 2021
@adamzapasnik
Copy link
Owner

Hey @jonleighton
Currently, there is no formatting enabled for single line expressions. But it's something worth thinking about, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants