-
Notifications
You must be signed in to change notification settings - Fork 64
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
Two-space indentation #1847
Comments
Just for completeness, I would like to add the example with 2 space indentation also in the target code.
I can relate to the concern about the last two lines. To me personally, however, it still looks fine with the 2 spaces. Maybe this is because I am used to 2 space indentation from other projects. So my vote would be for closing this issue. I am undecided about what we should do about the target code. We could try to hook in with the target language formatters, but I am very skeptical about this path. The root of the problem is that we are mixing two languages, and perhaps we shouldn't do this in the first place. |
I'm not sure that changing from 2 to 4 spaces fixes anything. If you are expecting the closing brace to be one indentation unit of indentation removed from the inner the code block, then that also won't be the case with 4-space indentation: the I agree that it may be easier to spot the difference between 1 and 2 spaces than between 3 and 4, but that doesn't change the fact that the indentation will always be off by one because of the extra character that we use... |
OK, I give up. Please adjust all the tests and examples so that they use two-space indents in the reaction bodies. Currently, with the mix, they look pretty ugly. |
One request is still not done: setup instructions for IntelliJ and VS Code need to explain how to set default spacing to two, which no IDE that I've encountered defaults to. |
This was autoclosed by the merge. I think we should try to make 2 spaces the default where possible, instead of relying on the user to make this change. For the developer IntelliJ we might be able to control this either in the version controlled configuration files or in the gradle setup. For Epoch and the VS Code extension, it should be possible to create artifacts that use a 2 space default. |
In VSCode, the default setting is |
lf-lang/epoch#21 will configure Epoch to use 2 spaces for tabs. |
This is a bike-shedding issue that we should should either act on now, while we are in the middle of reformatting pain, or close permanently. I'm fine either way.
The issue is that two-space indentation does not look very good with a two-character delimiters for target code. For example, from our test suite:
The last two lines are what I'm concerned about. This does not look good to me. A separate issue is that the code body indentation is left alone (as it probably should be), and in this case, it uses four spaces. With four-space indentation all around, it looks like this:
This looks better to me. I do not feel strongly about this and am fine with closing this issue if we want to stick to two-space indentation.
The text was updated successfully, but these errors were encountered: