-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Syntax page #200
Add Syntax page #200
Conversation
docs/.vitepress/config.mts
Outdated
@@ -103,6 +103,7 @@ export default defineConfig({ | |||
items: [ | |||
{ text: "What is Melange", link: "/what-is-melange" }, | |||
{ text: "Rationale", link: "/rationale" }, | |||
{ text: "Syntaxes", link: "/syntaxes" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in its own page, but maybe it should be merged into Getting Started instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason "Syntaxes" doesn't sound good to me (?), maybe it's just an impression but would "Supported syntaxes" make more sense or I'm tripping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to "Supported syntaxes" in 5bacbf3
docs/syntaxes.md
Outdated
"opam-check-npm-deps" {with-test} | ||
"ocaml-lsp-server" {with-test} | ||
"dot-merlin-reader" {with-test} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should with-test
be replaced by dev
? I copied this directly from melange-opam-template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd replace it as 2.2 is released now. It is with-dev-setup though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jchavarri I created PR to update melange-opam-template: melange-re/melange-opam-template#38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to with-dev-setup
in 5bacbf3
cc @psb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, it'd be great if @davesnx could also check as he suggested the idea of new "Syntaxes" section.
cc @anmonteiro
docs/syntaxes.md
Outdated
"opam-check-npm-deps" {with-test} | ||
"ocaml-lsp-server" {with-test} | ||
"dot-merlin-reader" {with-test} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd replace it as 2.2 is released now. It is with-dev-setup though.
docs/syntaxes.md
Outdated
opam install -y . --deps-only | ||
``` | ||
|
||
Note that reason support is already set up for you in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that reason support is already set up for you in | |
Note that Reason support is already set up for you in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5bacbf3
docs/syntaxes.md
Outdated
Note that reason support is already set up for you in | ||
[melange-opam-template](https://github.com/melange-re/melange-opam-template). | ||
|
||
## Editor configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would mention that this is the "Editor configuration for Reason syntax" and somehow reference the previously existing Editor conf section.
Alternatively, move this editor conf section to /getting-started.html to consolidate all editor config under a single section, and maybe specify the part that is Reason specific with a link to /syntaxes
page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added link to "Editor integration" section of getting-started. Also added a link from "Editor integration" back to this page. It seems a bit circular, but I figure that explaining how to set up format-on-save for Reason syntax doesn't necessarily make sense if it hasn't been explained what Reason syntax is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a section on "Formatters" explaining refmt for Reason and ocamlformat for OCaml
docs/syntaxes.md
Outdated
To install Reason syntax support add `reason` to the `depends` section of the | ||
`<project-name>.opam` file in your project: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect a link to reasonml docs somewhere here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added links to both OCaml syntax and Reason syntax in the opening paragraph: 5bacbf3
docs/syntaxes.md
Outdated
@@ -0,0 +1,64 @@ | |||
# Syntaxes | |||
|
|||
Melange supports two syntaxes: OCaml syntax (the default) and Reason syntax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a paragraph on what we mean by syntaxes, before we say melange supports both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would mention that the syntax for the melange website can be toggled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/syntaxes.md
Outdated
|
||
## Editor configuration | ||
|
||
To enable format-on-save in VS Code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably link to reasonml editor for more info? and same for OCaml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What page do you want to link to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link in c36a87e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a section on "Formatters" explaining refmt for Reason and ocamlformat for OCaml
Added a Formatters section in 5bacbf3
docs/syntaxes.md
Outdated
"opam-check-npm-deps" {with-test} | ||
"ocaml-lsp-server" {with-test} | ||
"dot-merlin-reader" {with-test} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jchavarri I created PR to update melange-opam-template: melange-re/melange-opam-template#38
docs/.vitepress/config.mts
Outdated
@@ -103,6 +103,7 @@ export default defineConfig({ | |||
items: [ | |||
{ text: "What is Melange", link: "/what-is-melange" }, | |||
{ text: "Rationale", link: "/rationale" }, | |||
{ text: "Syntaxes", link: "/syntaxes" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to "Supported syntaxes" in 5bacbf3
docs/syntaxes.md
Outdated
@@ -0,0 +1,64 @@ | |||
# Syntaxes | |||
|
|||
Melange supports two syntaxes: OCaml syntax (the default) and Reason syntax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/syntaxes.md
Outdated
To install Reason syntax support add `reason` to the `depends` section of the | ||
`<project-name>.opam` file in your project: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added links to both OCaml syntax and Reason syntax in the opening paragraph: 5bacbf3
docs/syntaxes.md
Outdated
"opam-check-npm-deps" {with-test} | ||
"ocaml-lsp-server" {with-test} | ||
"dot-merlin-reader" {with-test} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to with-dev-setup
in 5bacbf3
docs/syntaxes.md
Outdated
opam install -y . --deps-only | ||
``` | ||
|
||
Note that reason support is already set up for you in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5bacbf3
docs/syntaxes.md
Outdated
|
||
## Editor configuration | ||
|
||
To enable format-on-save in VS Code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What page do you want to link to?
docs/syntaxes.md
Outdated
Note that reason support is already set up for you in | ||
[melange-opam-template](https://github.com/melange-re/melange-opam-template). | ||
|
||
## Editor configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added link to "Editor integration" section of getting-started. Also added a link from "Editor integration" back to this page. It seems a bit circular, but I figure that explaining how to set up format-on-save for Reason syntax doesn't necessarily make sense if it hasn't been explained what Reason syntax is.
7e12f37
to
030b370
Compare
docs/syntaxes.md
Outdated
the [OCaml Platform VS Code | ||
extension](https://marketplace.visualstudio.com/items?itemName=ocamllabs.ocaml-platform), | ||
works well with Reason, but some tools aren't completely aware of it—for | ||
example, error messages from the compiler still use OCaml syntax. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would either link the issue here or not even mention this, since it's not always the case. Sometimes the error gets in reason and sometimes it doesn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted that line in 55b49d4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome, good job @feihong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
On the command line, run | ||
|
||
```bash | ||
opam install -y . --deps-only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention that alternatively, users can just run opam install reason -y
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added alternate command in 55b49d4
Addresses #38