Comments (2)
I think after merging #4 after first parameter there will be insert newline so example
def something(a: Int,
b: String,
c: Boolean)(d: Int,
e: String,
f: Boolean)
could cook like this
def something(a: Int,
b: String,
c: Boolean)
(d: Int,
e: String,
f: Boolean)
from scalariform.
One of the design goals for #7 and #8 are to simplify several multi-line
parameter formattings into one style, instead of several different ones:
If #7, #8, and #9 are implemented,
// Number 1
def something(a: Int,
b: String,
c: Boolean)(d: Int,
e: String,
f: Boolean)
// Number 2
def something(
a: Int,
b: String,
c: Boolean)(d: Int,
e: String,
f: Boolean)
// Number 3
def something(
a: Int,
b: String,
c: Boolean)(
d: Int,
e: String,
f: Boolean)
Number 1, 2, and 3 would all become this:
def something(
a: Int,
b: String,
c: Boolean
)(
d: Int,
e: String,
f: Boolean
)
Without #7 and #8, currently, Number 1 might become
def something(a: Int,
b: String,
c: Boolean)
(d: Int,
e: String,
f: Boolean)
Number 2 might become
def something(
a: Int,
b: String,
c: Boolean)
(d: Int,
e: String,
f: Boolean)
and Number 3 might become
def something(
a: Int,
b: String,
c: Boolean)(
d: Int,
e: String,
f: Boolean)
PR #4 would still be useful in the case of single line parameters:
def something(a: Int, b: String, c: Boolean)(d: Int, e: String, f: Boolean)
something(a, b, c)(d, e, f)
==>
def something(a: Int, b: String, c: Boolean)
(d: Int, e: String, f: Boolean)
something(a, b, c)
(d, e, f)
Having only one final style for the multi line case also happens to simplify
some of the uglier code I've had to implement to get alignParameters working
the way it does now.
Thoughts?
from scalariform.
Related Issues (20)
- Multi-line arguments are not formatted correctly when the argument ends in an operator application.
- please rename your directories to org/scalariform HOT 1
- Force 4 spaces for constructor args and 2 for extends HOT 1
- Allow for better formatting of curried parameter lists HOT 2
- Provide option to indent method parameters at level of method HOT 1
- Scalariform reformats code such that line length is way too long HOT 1
- move tickets and close all PRs HOT 6
- Dot-less method call with type argument triggers parser error HOT 1
- CLI does not build HOT 1
- Parser error for operator with explicit type argument HOT 1
- Parser cannot parse val named `->` HOT 1
- Issue line/column information with parsing errors HOT 1
- sbteclipse-plugin dependency is very old HOT 1
- Multi-line named parameters are not formatted correctly. HOT 1
- Ability to list deviations from style. HOT 3
- Chained methods readablity broken HOT 1
- What am I missing? AlignParameters not working for me HOT 2
- BUG: not possible to set `defaultScalariformSettings` in default settings HOT 3
- Ability to align custom token HOT 2
- Allow enforcing camelCase HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scalariform.