Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 26 2017 22:35
    olafurpg synchronize #947
  • May 26 2017 22:23
    olafurpg synchronize #947
  • May 26 2017 22:22
    olafurpg synchronize #947
  • May 26 2017 22:20
    olafurpg opened #947
  • May 26 2017 22:07
    olafurpg commented #943
  • May 26 2017 21:53

    olafurpg on v1.0.0-RC1

    (compare)

  • May 26 2017 21:46

    olafurpg on master

    Upgrade to non-broken metaconfi… Merge pull request #946 from ol… (compare)

  • May 26 2017 21:46
    olafurpg closed #946
  • May 26 2017 21:25
    olafurpg opened #946
  • May 26 2017 14:44

    olafurpg on master

    documentation fix: binPackParen… Merge pull request #945 from na… (compare)

  • May 26 2017 14:44
    olafurpg closed #945
  • May 26 2017 14:43
    olafurpg commented #943
  • May 26 2017 14:39
    olafurpg commented #943
  • May 26 2017 14:03
    pjrt commented #943
  • May 26 2017 13:36
    pjrt commented #943
  • May 26 2017 13:12
    nadavwr opened #945
  • May 25 2017 22:57
    ScalaWilliam commented #943
  • May 25 2017 21:34
    pauldraper commented #890
  • May 25 2017 21:34
    pauldraper commented #890
  • May 25 2017 17:23
    olafurpg commented #943
Tomasz Godzik
@tgodzik
also not sure if it would solve your particular issue
Sander Dijkhuis
@sander
In this case that didn't work, possibly due to setting newlines { source = fold }
heksesang
@heksenlied:matrix.org
[m]
Is there a plan to release a version with Scala 3 support soon?
Tomasz Godzik
@tgodzik
@/all We've just released Scalafmt with support for Scala 3 ! Not yet final release, but please do test it out!
Odd Möller
@odd
:clap:
Przemek Sokół
@falconepl
:clap:
heksesang
@heksenlied:matrix.org
[m]
Is there an option to remove braces when running with Scala3 dialect?
heksesang
@heksenlied:matrix.org
[m]
Also, I run into issues with errors about illegal start of simple expression at vals I declare in for yields like this: https://gitlab.com/heksesang/scala3-derivation/-/blob/master/pureconfig-derivation/src/no/heksesang/derivation/pureconfig/product.scala#L32
I assume it doesn't quite understand that I am simply omitting braces. It also doesn't like export statements.
Tomasz Godzik
@tgodzik
@heksenlied:matrix.org that will be available soon, probably in 3.0.0 final. For any issues please do report them.
heksesang
@heksenlied:matrix.org
[m]
How do I force newlines before multiline expressions in a for yield?
Tomasz Godzik
@tgodzik
heksesang
@heksenlied:matrix.org
[m]
Doesn't seem to work.
heksesang
@heksenlied:matrix.org
[m]

before:

for {
  (id, user) <-
    create(
      givenName,
      surname,
      nin,
      memberships
    )
} yield user

after:

for {
  (id, user) <- create(
    givenName,
    surname,
    nin,
    memberships
  )
} yield user
1 reply
I want it to force the former.
But none of the options seem to do that.
Tomasz Godzik
@tgodzik
Might not be an option to do that then
Tomasz Godzik
@tgodzik
btw. @heksenlied:matrix.org I run the parser on https://gitlab.com/heksesang/scala3-derivation/-/tree/master and picked up a couple of bugs we had, which should work in the parser now
heksesang
@heksenlied:matrix.org
[m]
Is it possible to run a snapshot version of the latest code in master from Metals?
Tomasz Godzik
@tgodzik
not yet, I might have jumped the gun. I opened up a bunch of PRs with fixes, which are not yet merged
once we merge updated parser into scalafmt it should be possible to download the snapshot and try it out
heksesang
@heksenlied:matrix.org
[m]
Can I specify snapshot versions in the .scalafmt.conf file, or do I have to do something else to make it work with snapshots? Didn't really understand the instructions on the site in regards to snapshot versions last time I looked at it.
Tomasz Godzik
@tgodzik
This might actually work via Metals
I think you would need to add cpoursier repositories setting
export COURSIER_REPOSITORIES="ivy2Local|central|sonatype:snapshot" or in Metals setting
if used in metals settings it should be avialable when Metals tries to download the specific version
Tomasz Godzik
@tgodzik
seems it doesn't work :/
and use the created binary to run scalafmt
afterwards it should be cached lcoally so MEtals would be able to pick that up
Bill Frasure
@swoogles
Hey all, I've got a project where markdown files include fenced Scala snippets.
Is there any sort of standard approach for applying scalafmt to those snippets and altering them in-line?
Or is that not a proper use case for scalafmt, and it's really intended for .scala files only?
heksesang
@heksenlied:matrix.org
[m]
For Scala 3 files it seems that a line break is being forced before the extends part of each case in enum-definitions.
2 replies
Tomasz Godzik
@tgodzik
@heksenlied:matrix.org do you have an example? I would like to confirm it with the recent fixes
We'll release RC2 most likely this week
heksesang
@heksenlied:matrix.org
[m]

Seems your sample file does exactly that:

case Mercury
      extends Planet(
        3.303e+23,
        2.4397e6
      )

instead of:

case Mercury extends Planet(
  3.303e+23,
  2.4397e6
)
Tomasz Godzik
@tgodzik
in the example it breaks it like that due to column limit
since the full definition will not fit within 40 character column limit, we break it into multiple lines. That's the same behaviour as for classes
heksesang
@heksenlied:matrix.org
[m]
Okay, so my example there cannot be achieved as it is now?
Tomasz Godzik
@tgodzik
from what I know, not currently, but there might be some setting that I have no idea about
Tomasz Godzik
@tgodzik
btw. I haven't noticed before, but this seems to be fixing your issue: scalameta/scalafmt#2452
@heksenlied:matrix.org
heksesang
@heksenlied:matrix.org
[m]
Nice, now we just need to get that merged and release a 3.0.0-RC2 soon. :D
Tomasz Godzik
@tgodzik
@/all new release is out! We've managed to fix a number of issues connected to Scala 3, there are new rewrite rules to help out turning your code into actual Scala 3 code and a bunch of other improvements. Please check it out and report any issues that pop up. If nothing major is reported we will most likely make the final 3.0.0.
Tomasz Godzik
@tgodzik
By turning your code into actual Scala 3 I meant removing deprecated syntax
heksesang
@heksenlied:matrix.org
[m]
I assume everyone understands that, because if it was understood as anything else it would mean that scalafmt is pure magic. :P
Bill Frasure
@swoogles
Re-asking-