Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    nafg
    @nafg
    It seems in settings there's a pretty advanced mechanism to configure automatic language injection
    It seems Slick sql"..." strings get injected as SQL but I don't see it there
    Anyway I want to add one for play.twirl.api.StringInterpolation#html
    That is, html"""<b>strings</b>""" should work
    How can I do it that?
    Dan Di Spaltro
    @dispalt
    @nafg I don't work at JB, but under languages & frameworks -> scala -> misc, there seems to be an option.
    nafg
    @nafg
    @dispalt thanks!
    Dmitrii Naumenko
    @unkarjedy
    thats right,
    we will consider adding html/js/json and maybe some other to the defaults
    Alexis BRENON
    @AlexisBRENON
    Hi. I am currently trying to implement a "Scala stream debugger" (https://github.com/AlexisBRENON/scala-chain-debugger), inspired by the Java Stream Debugger plugin (https://github.com/bibaev/stream-debugger-plugin). Copying the Java debugger, I am writing a Visitor to detect and build chains. Hence, I am inheriting from the ScalaRecursiveElementVisitor and overriding the def visitMethodCallExpression(call: ScMethodCall): Unit method. In this method, I need a PsiMethodCallExpression which I think I can unwrap from the ScMethodCall object, but I cannot find how to obtain it. Are they related as I expect or not at all ? Thanks.
    Nikolay Tropin
    @niktrop
    @AlexisBRENON Hi! PsiMethodCallExpression is a method call in Java language. While some definitions in Scala plugin inherit from java interfaces like PsiClass or PsiMethod, scala expressions are completely independent from java.
    Alexis BRENON
    @AlexisBRENON
    @niktrop Ok, thanks for the explanation.
    objektwerks
    @objektwerks
    Has anyone successfully used a Scala worksheet with Scala 2.13?
    I can't get past this error Internal error: java.lang.NoClassDefFoundError: scala/Serializable
    Nor this exception Warning:java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@7c975339 rejected from java.util.concurrent.ThreadPoolExecutor@74a9cf43[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 18]
    I have Scala 2.13 configured in Project Structure as a Library. A worksheet is compiled with Scala 2.13. But I can't run the worksheet.
    I've never used this gitter channel. And I don't know if the Intellij Scala plugin team visits this channel. TIA!
    objektwerks
    @objektwerks
    While I'm here, has anyone else noticed the bizarre window sizing and resizing with Intellij IDEA 2019.2 CE? I've never had an issue with window sizing for my projects until version 2019.2. Very odd window sizing behavior when opening projects.
    Dmitrii Naumenko
    @unkarjedy
    @objektwerks
    Sorry, but scala worksheet is currently broken for 2.13. That includes the error you are facing.
    We are planning to push a fix in the next bugfix release, please follow:
    https://youtrack.jetbrains.com/issue/SCL-15948
    Dmitrii Naumenko
    @unkarjedy

    I've never used this gitter channel. And I don't know if the Intellij Scala plugin team visits this channel. TIA!

    We do visit this channel)
    Usually, someone from our team responds within several hours (mostly within the first hour) if it's not a weekend or off-hours.

    Dmitrii Naumenko
    @unkarjedy

    While I'm here, has anyone else noticed the bizarre window sizing and resizing with Intellij IDEA 2019.2 CE? I've never had an issue with window sizing for my projects until version 2019.2. Very odd window sizing behavior when opening projects.

    In which way exactly is the sizing odd in your case?
    Is it somehow similar to this: https://youtrack.jetbrains.com/issue/IDEA-218956?

    objektwerks
    @objektwerks
    @unkarjedy Thanks, Dimitrii, for the timely update on Scala 2.13 support for Scala worksheets. I work on a MBP 15" laptop. Until the release of 2019.2, all of my project windows were perfectly sized to fit the entire window. Anytime I opened a project, the window size and position were consistently perfect. Now, my project windows open in the center of the screen in what might be a 400 x 300 window. I then resize the window correctly. And, sometimes, it opens correctly the next time. And sometimes not.;) Something had to really change in 2019.2 for this different window behavior to suddenly appear. So, yes, IDEA-218956 describes the same window behavior. Thanks again! Cheers!
    ovu
    @ovu
    Hi there, is there a way (shortcut) to show the type of an expression in Scala?
    Roman Janusz
    @ghik
    Alt+=?
    ovu
    @ovu
    Hi @ghik , I am using Mac and it is Ctrl + Shift + p. However, when selecting an expression using the Vim plugin I get always the type Unit. Something is wrong there...
    Dmitrii Naumenko
    @unkarjedy
    @sugakandrey ^ can you check it on your mac?
    Wojtek Pituła
    @Krever

    Hey, is it know issue that sbt import doesnt work with sbt 1.3.0-RC3 ? I dont expect it to work with RCs but wanted to let you know. I'm getting

    [error] Expected ';'
    [error] Not a valid key: dumpStructure (similar: buildStructure)
    [error] */*:dumpStructure
    [error]                  ^

    Edit: I'm 6 versions behined latest, so will check again after update
    Edit 2: latest yields the same
    Edit 3: 1.3.0-RC2 works ok

    Yeah, it's a known issue)
    Wojtek Pituła
    @Krever
    thanks :)
    OlegYch
    @OlegYch
    how come i don't have that issue?
    nightly builds?
    Moritz Bust
    @Busti
    Is there any chance to get colors working in the IntelliJ sbt console?
    It seems like special characters are also not working as they are supposed to.
    In the IntelliJ console I get [info] i 「wdm」: Compiled successfully.
    Which is actually supposed to look like this: (mingw shell)
    image.png
    Moritz Bust
    @Busti
    When I run sbt through the IntelliJ builtin console, color does work for some things, but the webpack colors and special characters don't work either and the garbled characters are different.
    image.png
    Georgi Krastev
    @joroKr21
    Hi, is there a way to restore only the import style settings for Scala to default?
    Dmitrii Naumenko
    @unkarjedy

    Hi,
    There is no a straightforward way to do that via UI.
    You can do it manually by removing these options:

    addFullQualifiedImports
    addImportMostCloseToReference
    classCountToUseImportOnDemand
    collectImports
    doNotChangeLocalImportsOnOptimize
    importLayout
    importShortestPathForAmbiguousReferences
    importsWithPrefix
    sortAsScalastyle
    sortImports

    from

    <component name="ProjectCodeStyleConfiguration">
        <code_scheme name="Project" version="173">
            <ScalaCodeStyleSettings>
                ...
            </ScalaCodeStyleSettings>
        </code_scheme>
    </component>

    of
    .idea/codeStyles/Project.xml (for project-level settings)
    ~/.IntelliJIdea2019.2/config/codestyles/<style_name> (for IDE-level settings)

    Georgi Krastev
    @joroKr21
    Ok thanks @unkarjedy I will give it a try
    Nice, I only had the layout modified but it was causing merge conflicts too often :sweat_smile:
    Justin Kaeser
    @jastice
    @Krever yes, it's a known issue with RC3. It should be already fixed in sbt Nightly releases, or the next RC
    @Busti We intend to support colors in the sbt shell under Windows, but it might require some changes in the underlying components. Meanwhile, please vote on https://youtrack.jetbrains.com/issue/SCL-13295
    regarding garbled characters, maybe there is some mismatch between the console/shell codepage and the one the shell process is started with?
    Dmitrii Naumenko
    @unkarjedy
    @Busti Actually output formatting should be disabled with flag -Dsbt.log.noformat=true on Windows now.
    What version of sbt are you using?
    I saw there are some issues with this flag in the new versions of sbt but didn't check it yet:
    sbt/sbt#3921
    Moritz Bust
    @Busti
    I left an upvote on the issue. Thank you very much for replying :)
    I am on Windows, it would be nice to see this working on windows some time, but I guess it is just a minor inconvenience.
    I am on sbt 1.2.8
    I will try playing around with the flag a bit once I get home.
    Dmitrii Naumenko
    @unkarjedy
    The flag should be automatically added by Scala Plugin for Windows.
    Could you please send the first line of sbt shell output (the one with command line arguments) (make sure to remove any sensitive data)
    Moritz Bust
    @Busti
    Sure, it is present in the command.
    "C:\Program Files\Java\jdk-12.0.1\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=localhost:50928,suspend=n,server=y -Xdebug -server -Xmx1536M -Dsbt.supershell=false -Didea.managed=true -Dfile.encoding=UTF-8 -Dsbt.log.noformat=true -jar C:\Users\mbust\.IntelliJIdea2019.2\config\plugins\Scala\launcher\sbt-launch.jar --addPluginSbtFile=C:\Users\mbust\AppData\Local\Temp\idea.sbt "; set ideaPort in Global := 50907 ; idea-shell"
    Kai
    @kaishh
    @Krever sbt 1.3.0-RC4 just released and idea import now works
    Wojtek Pituła
    @Krever
    thanks!