Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Chris Kipp
    @ckipp:matrix.org
    [m]
    @sinanspd: I don't believe there is an easy way to add that unless you'd add it into the actual scala syntax plugin https://github.com/scala/vscode-scala-syntax
    Sheng-Loong Su
    @code_ssl_twitter
    Hi everyone, is there a way in Vim to quickly add type annotation like in Intellij, eg. from def run() = {...} to def run(): Unit = {...}? I tried coc-codeaction-line and got No code action available.
    felher
    @felher
    @code_ssl_twitter I asked that myself a couple of months back. The answer was: Move with the cursor over the variable and do:
    :call CocActionAsync("codeAction", "cursor")
    Of course, you should be able to map that to whatever you want :)
    Sheng-Loong Su
    @code_ssl_twitter
    Wow, it works! Thanks a lot, @felher!
    Quafadas
    @Quafadas

    WIth metals, I'm using sbt as my build server in an (experimental :-/) multi project setup,

    I want to customise some integration tests

    class WithDbFramework extends utest.runner.Framework

    In an SBT terminal, the tests run fine.

    If I click on the "ghost link" to run the test "in place" in metals, I get errors. The test looks for a test config file;

    val confFile = new File("./modules/backend/src/test/scala/dev.conf")

    which apparently, it can't find ...

    [ERROR] Uncaught exception when running tests: org.ekrich.config.ConfigException$Missing: ./modules/backend/src/test/scala/dev.conf (not found): No configuration setting found for key 'db'

    Would this be expected? Is it expected that an sbt terminal exhibits different behaviour to "metals runner"?

    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    Hello 👋 just joined to ask whether i need to set up sth specifically for getting metals support for simple scala scripts in VS code
    Chris Kipp
    @ckipp:matrix.org
    [m]
    hey Nik, can you explain what sth is?
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    sth = something? :)
    Chris Kipp
    @ckipp:matrix.org
    [m]
    lol if that means something, then once you have Metals installed, there is nothing additional you'd need for a Scala script
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    Ok so if i open up a folder containing only a file of data and a script.sc, suggestions should work fine? :o
    Chris Kipp
    @ckipp:matrix.org
    [m]
    well it sort of depends on what you're expecting
    if you open script.sc in an empty directory Metals will assume that you have an ammonite script and will prompt you to import it
    so it will be treated as an Ammonite script
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    ah i see :/ so then scala 3 is just not gonna work :/
    or did li & co. already port it?
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    There's some preliminary support for Scala 3 in ammonite, yes
    Chris Kipp
    @ckipp:matrix.org
    [m]
    afaik, we have zero tests for Ammonite and Scala 3
    so it sort of depends on what your aim is
    it might be preferable to use worksheets if you are just messing around
    also keep in mind that if you have a directory with a standalone file, the version of Scala that will be used will be defaulted to the version that metals uses
    if you want a fallback on Scala 3 instead you'd need to set fallbackScalaVersion in your settings
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    aaah! i see, thank you
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    just as a brief example:
    i was hacking this smol script for doing a bunch of random calculations and scala 2 support works pretty well, but scala 3 just goofs on me :/
    also this when i manually start the ammonite server
    Chris Kipp
    @ckipp:matrix.org
    [m]
    yea, so the version of Ammonite we support isn't published for Scala 3 yet
    you can also add a newer ammonite version with // ammonite <version>
    but again, no guarantees how that will work
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    cool :o i'll just try a few things
    Chris Kipp
    @ckipp:matrix.org
    [m]
    actually just looked
    I'm pretty positive it won't work
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    yeah it doesnt :/
    rip me i guess
    thx for the quick help :>
    Chris Kipp
    @ckipp:matrix.org
    [m]
    since we pull in ammonite-repl-api via https://github.com/alexarchambault/ammonite-runner I believe there needs to be some changes there to account for the pretty large changes that happened in Ammonite
    if you can, please do create an issue about not being able to use Scala 3 with Ammonite
    then we'll have it tracked and are more aware of it
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    I mean when i opened vs code i just wanted to run scala 3 code via the scala3 binary from the AUR. I am not sure how its related to ammonite-runner :o
    Chris Kipp
    @ckipp:matrix.org
    [m]
    you could instead just make it a .scala file instead of a .sc file
    Nik
    @your-psychiatrist:ellipsen.net
    [m]
    i guess that's the way to go for now yes
    Greg Fisher
    @gnfisher
    I used to be able to jump to definition and go into a dependency's code. I can't do that any longer. I don' t think I changed anything (other than upgrading metals). I'm using coc nvim but am also not able to do it in a fresh setup of nvim-lspconfig using metals. Anyone know how I might adjust things to be able to do that again? Or is this not metals related?
    Chris Kipp
    @ckipp:matrix.org
    [m]
    this should totally still work.
    did you update to the latest Metals @gnfisher ? When you are trying to navigate do you see any errors in your .metals/metals.log?
    Siddhant Sanyam
    @siddhant3s
    Do you guys know where can I find logs from the bloop server?
    1 reply
    Swoorup Joshi
    @Swoorup
    is it also possible to have clickable links for documentations?
    image.png