Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gabriele Petronella
    @gabro
    not in Metals, no. That would be in scope of Scalafmt (and Metals would honor the configuration) but IIRC there’s only one to remove redundant braces, not to add them. You can try asking in the Scalafmt channel though
    Thomas Suckow
    @thomassuckow
    @gabro thanks, didn't think to try completion
    Justin Pitts
    @justinpitts
    Hello. Is there a way to get support for completions with scala 2.11?
    Gabriele Petronella
    @gabro
    @justinpitts completions (and all Metals features) are supported in 2.11, although only 2.11.12
    vito-c
    @vito-c
    @gabro yah I asked in scalafmt but no response :)
    Justin Pitts
    @justinpitts
    @gabro unfortunately my client is stuck on 2.11.8 ( Spark 2.2.0 )
    Justin Pitts
    @justinpitts
    I do notice that if I upgrade to 2.11.12. Metals displays the following message: "You are using a legacy Scala version 2.11.12, which might not be supported in future versions of Metals. Please upgrade to Scala 2.12.10."
    Is there any kind of concrete end-of-life planned by the Metals team for 2.11?
    Gabriele Petronella
    @gabro
    @justinpitts no, not at the moment. 2.11.12 will keep working for a while
    Justin Pitts
    @justinpitts
    Thank you.
    Ólafur Páll Geirsson
    @olafurpg
    @justinpitts there's no EOL planned for 2.11, the current support for 2.11 is likely to continue unchanged but we reserve the right to release new functionality that works only in 2.12+. Contributors are always welcome to improve the 2.11 support. None of the current Metals contributors are using 2.11 so it's difficult to motivate spending extra hours (from already limited time) to make new features work on 2.11.
    Gabriele Petronella
    @gabro
    thanks @olafurpg for clarifying (I was from mobile before)
    Justin Pitts
    @justinpitts
    @olafurpg That is very reassuring - I appreciate it. WRT releasing new functionality - that's completely reasonable. I could be convinced to be a contributor.
    Ólafur Páll Geirsson
    @olafurpg
    @justinpitts there's been a lot of improvements in the compiler since 2.12+ that help tooling, for example the exhaustive pattern match completions may not work as reliably in 2.11 and there isn't much we can do about it on the Metals side
    another big one is that -Yrangepos doesn't crash the compilation in 2.12+ while that can often happen in macro code in 2.11
    Justin Pitts
    @justinpitts
    understood.
    Neither is really likely to affect my use case in 2.11
    Gabriele Petronella
    @gabro
    2019-12-11 18.12.34.gif

    :wave: we just merged a new feature and we could use some real-world testing! We now support our first "code action", also known as quickfixes or refactors :point_up:

    Previously auto-imports would only work when triggered by completions. Now we support auto-imports using code actions

    if you want to test it and provide some feedback, you can use the latest snapshot (0.7.6+530-f4aefd3d-SNAPSHOT at the time of this message)
    Eric K Richardson
    @ekrich
    @gabro very cool!
    asaadza
    @asaadza
    @garbo - ... works exactly as shown in your animated gif and I haven't managed to break it yet. Thanks!
    @olafurpg - I got worksheets working with that same snapshot, on linux (file extension needs to be worksheet.sc) - it is really fast and smooth compared to similar available options, a really impressive start, and a very useful and usable tool, already pretty-full featured, but with a lightweight feel to it for anybody wanting to just try some stuff out in their own environment. On Windows, with latest everything there too, it gets as far as "Evaluating worksheet..." notification but neither decorations nor popup on hover ever appear.
    Gabriele Petronella
    @gabro
    @asaadza cool! Thanks for letting me know
    Callum Okuefuna
    @callumfc
    Hey guys
    Im new to Metals, and I have a question, whenever im changing my sbt file and saving im getting an error saying no build tool detected in workspace and no build target, this only happens in the project where my scala code is multiple levels deeps in the directory structure
    Is there a way I can set my build target to a specific directory
    Tomasz Godzik
    @tgodzik
    We check the root dir in workspace for build.sbt, so you would need to open a new workspace with root at the directory with build.sbt to make it work.
    Callum Okuefuna
    @callumfc
    Ah okay create a new workspace, I'll try that
    Jesse Atkinson
    @jsatk
    What's the difference between Connect and Import?
    command! -nargs=0 MetalsImport
    \ call CocRequestAsync('metals', 'workspace/executeCommand', { 'command': 'build-import' })
    command! -nargs=0 MetalsConnect
    \ call CocRequestAsync('metals', 'workspace/executeCommand', { 'command': 'build-connect' })
    Gabriele Petronella
    @gabro
    Connect just establishes a connection with the build server, while import also runs the import task and then it connects
    basically connect is the last step of build import
    it’s useful when the connection drops for some reason, e.g. it happens sometimes when the Mac goes into sleep mode
    Jesse Atkinson
    @jsatk
    Ah. I thought this was the inverse.
    Thank you. So in general of my build doesn't auto import/run when I fire up Vim I should run :MetalsImport. And if I don't actually need to import anything and I just suspect the connection has dropped I run :MetalsConnect.
    Thank you @gabro.
    Gabriele Petronella
    @gabro
    Yep, exactly
    Jesse Atkinson
    @jsatk
    Maybe a silly question, but how do I keep metals up-to-date?
    It's not installed via a normal package manager for me. I followed the instructions here. https://scalameta.org/metals/docs/editors/vim.html#generating-metals-binary
    I know it's actively worked on. Would love to be able to pull in updates as it gets more stable/new features.
    Chris
    @ckipp01
    As of right now, the easiest way is to manually just copy the new version into your script and download it. However, if you are using coc, there may be an extension being worked on that will prompt you about new versions and then automatically install them :)
    We're also having a conversation about switching to date-based releases which would also be easier for the user to specify the nightly builds as well scalameta/metals#1172
    Gabriele Petronella
    @gabro
    Also, we already do it for some of the clients (e.g. we take care or releasing a new vscode extension version when a new stable version of the server is out)
    Jesse Atkinson
    @jsatk
    Ah. Excellent.
    Thanks.
    Another question... Is there a way for me to tell Metals to just auto-import? Not prompt me? Every time I change branchs, even when build.sbt hasn't been altered, it prompts me to press 1 to import.
    I use Vim + Coc.