Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    asaadza
    @asaadza
    one thing I don't always predict is when the worksheet execution will get re-triggered
    Ólafur Páll Geirsson
    @olafurpg
    more explicit run/cancel UI for execution
    asaadza
    @asaadza
    right
    Ólafur Páll Geirsson
    @olafurpg
    and would make it possible to provide full IDE support in markdown files
    without hijacking completion in *.md files
    for mdoc code fences
    asaadza
    @asaadza
    that would be a tutorial writer's dream
    Ólafur Páll Geirsson
    @olafurpg
    yup, and it's probably not so difficult to implement. Most of the infrastructure is there
    asaadza
    @asaadza
    one thing I was thinking years ago is that if scalajs was used instead of typescript, you would get more contributions, but I think you were worried about the facades having to change too often
    Ólafur Páll Geirsson
    @olafurpg
    vscode has a few helpful "proposed APIs" for notebooks that would be nice to land in stable, but not blockers really
    I don't think it would make a big difference
    asaadza
    @asaadza
    I keep seeing notebook support gets enhanced, but don't use python
    Ólafur Páll Geirsson
    @olafurpg
    the vscode client is not supposed to implement hardcore logic anyways, it's mostly glue code
    asaadza
    @asaadza
    no doubt, and some presentation
    Ólafur Páll Geirsson
    @olafurpg
    a core principle is that the metals server does the heavy lifting so that the same logic can be reused between editors
    asaadza
    @asaadza
    so, the real answer is that people could jsut contribute to metals, if that were the case!
    Ólafur Páll Geirsson
    @olafurpg
    non-trivial logic still naturally ends up living in the vscode client extension, but you want to limit it
    it takes some practice to add new features that change the server + client
    asaadza
    @asaadza
    was there ever a video or blog post about it?
    Ólafur Páll Geirsson
    @olafurpg
    it's a lot of moving pieces, scala server, lsp4j bindings (and Java reflection-based JSON serialization), and TS client
    this presentation is great https://www.youtube.com/watch?v=fpzN_vTBy18
    asaadza
    @asaadza
    if someone from scala-center could do an end-to-en demo of adding some trivial feature, including the TS bit, it would be at l;east interetsing
    Ólafur Páll Geirsson
    @olafurpg
    I recommend asking folks in the scalameta discord if you have questions
    asaadza
    @asaadza
    ... good, I hadn't seen that.
    Ólafur Páll Geirsson
    @olafurpg
    there's a metals-contributors channel
    asaadza
    @asaadza
    is everybody moving to discord these days?
    Ólafur Páll Geirsson
    @olafurpg
    it's a good idea to have a video of adding a new feature e2e
    cc/ @tgodzik
    I still regularly check gitter, but discord is more usable from mobile so I check it more often
    I'm signing off for now, happy to chat more another time @asaadza Thank you for the nice questions :)
    asaadza
    @asaadza
    ... very nice, good night!
    asaadza
    @asaadza
    ... just so I don't forget (I still use github RO, for now, and I'll put it here since we were already in that ballpark), one thing I often think would make life even easier in vscode is stating where stuff is declared/defined along with the type info on-hover.
    Ólafur Páll Geirsson
    @olafurpg
    That's a good idea, feel free to open a feature request here https://github.com/scalameta/metals-feature-requests
    esp. good if you can include how to format the definition
    asaadza
    @asaadza
    RO as in read-only
    ... btw, re the video you linked to, it is good thanks, and covers quite a lot of stuff I have discovered when I play with scala in vscode, but for people who didn't realise how far you guys have come with this, it should be an eye-opener. I suspect many IJ users, for scala, have no idea how far metals has evolved.
    asaadza
    @asaadza
    Anyway, better head back to the metals channel for this type of stuff - this one is so quiet that a handful of off-topic comments has an inordinate effect on the signal to noise ratio!
    David Geirola
    @geirolz
    Hi guys, I have a simple question, there is a way to enable the doc generation during the build? So when I run sbt compile
    Ólafur Páll Geirsson
    @olafurpg
    @geirolz the mdoc command is implemented as an alias for the “run” command with configured main methods. It might be possibie to implement this by overriding the compile task, worth asking in a more sbt-focused channel
    David Geirola
    @geirolz
    @olafurpg Ok, this seems is working (Compile / compile) := (Compile / compile).dependsOn((docs / mdoc).toTask("Generate docs")).value
    Jack Koenig
    @jackkoenig
    Is is possible to do something sort of like the inline Scastie snippets, but at mdoc-generation time it generates the Scastie and then embeds the now existing link?
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Jack Koenig
    @jackkoenig
    Yes that's what I have in mind, but my understanding (and please correct me if I'm wrong) is that the inline variant generates a Scastie when the user opens the webpage. I'd rather the Scastie be generated when I run mdoc locally such that the resulting HTML is more similar to embedded a Scastie snippet

    eg.

    ```scala mdoc:scastie
    val x = 1 + 2
    println(x)
    ```

    I want mdoc to see this, and connect to Scastie and generate a link when I run mdoc, such that the resulting file has

    <script src='https://scastie.scala-lang.org/<newly generated link>?theme=light'></script>

    Rather than the current thing which is a big chunk of javascript

    I could probably do this myself via a modifier, but it sounds like a useful feature that someone may have already implemented
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Right. I think (haven't used this modifier myself) it's stateless and perhaps with good reason - you'd need to either have some persistence indexed by snippet or call Scastie on every run of mdoc?
    Jack Koenig
    @jackkoenig
    Yeah the solution I have in mind is calling Scastie every time mdoc is run, but I consider that less costly than Scastie being run every time a user accesses a page. That being said it would be nice to cache if nothing has updated and then it's no longer stateless which is obviously its own bag of worms.
    Maybe this is "build your own unique tool" territory
    Anton Sviridov
    @velvetbaldmime:matrix.org
    [m]
    Smells like it :)