Is it feasible to implement a layout: false option? #317
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#317
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Hey, thx for brittany!
I have some reasons to suspect that I could like it more to write my code with explicit
{ ; }
style than relying on layout. Putting those symbols at the right spot is sometimes a lot easier, than fixing my alignment. After all for alignment I have brittany.</offtopic>
I have cloned brittany and started poking at the Layouters to see if I can get it to print explicit
{ ; }
.I can do it, when I put the
;
in front of every line, by prepending it withdocSeq
.I get code like this:
But I would also like to try to append it to every line, the bridoc documentation says I shouldn‘t, and alas when I try I get syntax errors (sadly brittany didn‘t tell me what syntax errors).
My questions:
;
to the last line of a possible multi line statement and what do I need to do to not append it to a comment?I'm not exactly sure what you're asking for. Do you want Brittany to consume or produce code without layouting?
Brittany can perfectly parse any code with or without layouting. The problem is, that it will then use layouting to print it again. So after formatting once all your
{ ; }
is gone.That's not a bug, but I was looking into making it possible to have an option for this.
It is possible to disable formatting entirely, which will preserve the explicit brackets and semicolons.
I didn‘t know about that option, although I searched for it for a while. Is it documented somewhere?
Anyways that is nice, but I’d still love to actually have formatting on blocks with braces.
So my initial question still stands, which is "How hard would it be, to get the formater to append a symbol to the last line of a multiline element."