You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the formatting of array literals in Typstyle can be improved to enhance readability and compactness. This proposal suggests several enhancements to the way array elements are formatted, particularly focusing on multi-line arrays and import sorting.
Proposed Features
Multi-line Array Literals:
Allow array elements to be placed on the same line when possible, rather than forcing each element onto a new line. For example:
[1, 2, 3, 4,
5, 6, 7, 8]
Instead of:
[1,
2,
3,
4]
Implement a heuristic to determine when to break lines based on element length and column width. For instance:
Calculate the length variance of elements.
Ensure no single element exceeds a certain proportion of the column width (e.g., half or one-quarter).
If the longest element exceeds the threshold, place each element on a new line.
The text was updated successfully, but these errors were encountered:
generated by genai from unstructured chat log
Issue Description
Currently, the formatting of array literals in Typstyle can be improved to enhance readability and compactness. This proposal suggests several enhancements to the way array elements are formatted, particularly focusing on multi-line arrays and import sorting.
Proposed Features
The text was updated successfully, but these errors were encountered: