Comments (11)
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.
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.
Can we un-reset just regions of that page? Through a selector
from reasonml.github.io.
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.
cc @jaredly
I wonder if we can remove the flex reset
from reasonml.github.io.
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.
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.
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.
It's annoying that safari is bad at flex though
from reasonml.github.io.
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.
@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)
- Update `refmt.js` to 3.5.1 HOT 2
- Addition to Newcomer Examples page
- A valid snippet crash the playground `type x = A{x: int};`
- Inline records do not work on the playground
- try sandbox react dom not found
- Clarify in the native section that `reason` needs to be added a dependency
- The `Object` documentation page prompts to scroll to non-existent `Tip & Tricks` section
- Weird repetition in Scanf documentation HOT 3
- [Try] endless crashing loop
- Broken Link
- Restore the syntax cheatsheet
- Reasonreviewrequested
- need to add `npm install` to quickstart script
- The 'Why' of 'What & Why' is vague and lacks evidence HOT 1
- Typo error in code snippet of Pattern matching document HOT 1
- Document extension nodes
- Melange playground HOT 4
- Some docs link to wrong project
- Create comparision with OCaml syntax
- Create a collection of guides on:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reasonml.github.io.