Giter Site home page Giter Site logo

Comments (11)

glennsl avatar glennsl commented on June 13, 2024 1

Hi @CompuIves! I'm not working on this atm since it looks like we can solve our performance problems by just not having silly css. Of course I'd still love to see better Reason support in Monaco! :)

from reasonml.github.io.

glennsl avatar glennsl commented on June 13, 2024

I had a go at this, but the css is so royally fucked it might have to be redone.

My guess is the Monaco editor is inserting divs to measure certain things, and having every single div "reset" to display: flex is (unsurprisingly) messing with those measurements, which causes Monaco to insert a 1000px margin, and offset this and that a few thousand pixels in either direction.

Removing the css "reset" fixes it, but of course screws up everything else.

from reasonml.github.io.

chenglou avatar chenglou commented on June 13, 2024

Can we un-reset just regions of that page? Through a selector

from reasonml.github.io.

glennsl avatar glennsl commented on June 13, 2024

Tried that, but I think it inserts divs at root. Also tried limiting what's reset, but that seems to make it too specific to be overridden where that's needed.

from reasonml.github.io.

chenglou avatar chenglou commented on June 13, 2024

cc @jaredly

I wonder if we can remove the flex reset

from reasonml.github.io.

chenglou avatar chenglou commented on June 13, 2024

I'm also suspecting that the flex reset across all divs is what's causing the huge slowdown on Try playground for Safari

from reasonml.github.io.

CompuIves avatar CompuIves commented on June 13, 2024

Hey! I'm currently looking into Monaco support for ReasonML as well, maybe we can work together on building/porting a language extension for this.

Related issue on CodeSandbox: codesandbox/codesandbox-client#119

from reasonml.github.io.

jaredly avatar jaredly commented on June 13, 2024

We could remove the flex reset, and just use a base "View" component instead of div, that has display: flex setup for us

from reasonml.github.io.

jaredly avatar jaredly commented on June 13, 2024

It's annoying that safari is bad at flex though

from reasonml.github.io.

rebornix avatar rebornix commented on June 13, 2024

Share my 2 cents here, since vscode-reasonml uses https://github.com/freebroccolo/ocaml-language-server, which is written in TS, we can port it to Monaco and provide the same intellisense as VSCode in browser. (Actually it doesn't matter if the LSP/Plugin is written in ocaml/reason or JavaScript as BuckleScript can help it out). I converted Vetur to monaco-vue so it should be not that complex to do the conversion for vscode-reasonml. The only thing I don't have confidence with is writing Reason language definition in https://microsoft.github.io/monaco-editor/monarch.html . @chenglou thoughts?

from reasonml.github.io.

chenglou avatar chenglou commented on June 13, 2024

@rebornix sorry for the late reply. Do these help? https://github.com/reasonml-editor/vscode-reasonml/tree/941bfbc803a7de24369b06ce1f26b58ca7821d7f/syntaxes

If it's just highlighting, in the worst case we can use JavaScript's

from reasonml.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.