olafurpg on v1.0.0-RC1
olafurpg on master
Upgrade to non-broken metaconfi… Merge pull request #946 from ol… (compare)
olafurpg on master
documentation fix: binPackParen… Merge pull request #945 from na… (compare)
Hi all,
I'm trying to make scalafmt format consecutive parameter blocks (at defn site) in the same way, i.e. to avoid formatting such as:
class MyClass(aaaaaaa: Aaaaaaaaa,
bbbbbbbbbbbbb: Bbbbbbbbbbbbbbb)
(implicit ccccccc: Ccccccccc,
dddddddddddd: Dddddddddddd) extends Eeeeeeee {}
to
class MyClass(aaaaaaa: Aaaaaaaaa, bbbbbbbbbbbbb: Bbbbbbbbbbbbbbb)(implicit
ccccccc: Ccccccccc,
dddddddddddd: Dddddddddddd)
extends Eeeeeeee {}
here with
align.openParenDefnSite = true
danglingParentheses.defnSite = false
Is this at all possible?
Hi folks 👋
Question: is there a workaround to get scalafmt
not failing when cross-compiling Scala 2.13.x and 3.0.x? Right now, it fails if I set scalafmtOnCompile := true
. I would like to keep running it on Scala 2.12.x and shared code but not for files in the Scala 3.x directory. I tried setting format: off
on my Scala 3 file but that didn't work.
I know that Scala 3 support is in progress so all I want is to skip Scala 3 files for now. Thanks!
if
s, and aligning the default case seems.... of
{ code = "=>" owner = "Case" except = ["Case(Pat.Wildcard(), None, _)", "Case(_, Some(_), _)"] }
case _ =>
as well as case clauses containing if
s.... just a thought :)
@df final class SMA extends DFDesign {
val clk = DFBit <> IN
val rst = DFBit <> IN
val x = DFUInt(16) <> IN init 0
val y = DFUInt(16) <> OUT
val x_prev1 = DFUInt(16) <> VAR init 0
val x_prev2 = DFUInt(16) <> VAR init 0
val x_prev3 = DFUInt(16) <> VAR init 0
val s1 = DFUInt(17) <> VAR init 0
val s1_pipe1 = DFUInt(17) <> VAR init 0
val s2 = DFUInt(17) <> VAR init 0
val sum = DFUInt(18) <> VAR init 0
val x_prev1_sig = DFUInt(16) <> VAR
val x_prev2_sig = DFUInt(16) <> VAR
val s1_sig = DFUInt(17) <> VAR
s1 := x.resize(17) + x_prev1
s2 := x_prev2.resize(17) + x_prev3
sum := s1_pipe1.resize(18) + s2
x_prev1_sig := x_prev1
x_prev2_sig := x_prev2
s1_sig := s1
ifdf(rst === 0) {
x_prev1 := 0
x_prev2 := 0
x_prev3 := 0
s1_pipe1 := 0
}
.elseifdf(clk.rising()) {
x_prev1 := x
x_prev2 := x_prev1_sig
x_prev3 := x_prev2_sig
s1_pipe1 := s1_sig
}
y := (sum >> 2).resize(16)
}
--- /github/workspace/something/foo.scala
+++ /github/workspace/something/foo.scala-formatted
@@ -1541,3 +1541,6 @@
),
- thing(someLongItem, dateLikeItem = LocalDateTime.of(2020, JANUARY, 15,12,0)),
+ thing(
+ someLongItem,
+ dateLikeItem = LocalDateTime.of(2020, JANUARY, 15,12,0)),
+ ),
thing(item, dateLikeItem = LocalDateTime.of(2020, JANUARY, 15, 12, 0))
Our current configuration formats like this:
val live: List[
String with String with List[String] with List[String] with List[String] with List[String] with List[String] with String with String with List[
String
] with String
] =
???
(Of course this is just a replacement for the actual type signature)
I'd like scalafmt to prefer breaking on with
instead of [
, how can I do that?
java.time
code from the core. I ported the library from Scala Native and now am using that to support sconfig
which requires some java.time
support. I left a note on the issue. scalameta/scalafmt#1172
I see the fast parse dependency is older with a comment, the version 1.0.1 is not on maven. The newest version 2.3.1 is supported on 2.12 and 2.13.
Ported config quite some time ago for this but we never quite made it to the finish line. 20 releases later now. The 4th release was the first with 0.3.9
Scala Native support. Hoping sconfig
will work ok - not many users.