Conversation

kevanstannard

Suggestion for #162

Add some of the basic operators.

Happy to hear any corrections or suggestions for improvements.

@@ -87,6 +114,78 @@ let allItems = [
category: Other,
component: controlflow_ifelse,
},
{
id: "integer-addition",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this data is good for drafting and testing, but since we will include a ton of syntax constructs, I am pretty sure that this will not scale on a bundle level, so we need to factor everything out into some server side rendered solution of some sort.

So what I think would be best is to put the metadata in the frontmatter of each syntax construct file, e.g. operators_integer_addition.mdx:

---
id: "integer-addition"
keywords: ["plus", "add", "addition", "sum", "int", "integer"]
name: "+"
summary: "This is the `integer addition` operator."
category: "operators"
---

You can of course still hook your components up with the SyntaxLookupWidget to test your keywords, but we will remove that code pretty soon later on, just so you know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ryyppy that makes sense, updated.

@ryyppy

Looking good. Will merge this for now and update the overview issue

@ryyppyryyppy merged commit bd2a478 into rescript-lang:syntax-lookup-tool Jan 4, 2021
@kevanstannardkevanstannard deleted the syntax-widget-basic-operators branch January 5, 2021 06:41
Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.