-
Notifications
You must be signed in to change notification settings - Fork 201
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
Common Editor Support for Syntax #254
Comments
Yup, this is definitely on the roadmap. If you'd like to build a syntax highlighter then go for it! I'd recommend building one for whichever editor you personally use. Creating a TextMate grammar should extend nicely to most editors. You should be able to build on top of a JSX syntax highlighter. Some differences are:
That's all I can name off of the top of my head, but that's the majority of the difference in regards to syntax. |
Will look into it.
As an aside, any plans for TypeScript types?
…On Sat, Aug 10, 2019, 18:44 Kabir Shah ***@***.***> wrote:
Yup, this is definitely on the roadmap. If you'd like to build a syntax
highlighter then go for it! I'd recommend building one for whichever editor
you personally use. Creating a TextMate grammar should extend nicely to
most editors. You should be able to build on top of a JSX syntax
highlighter. Some differences are:
1. Moon elements require parenthesis around them.
2. Property keys can be empty, so you can do <Component="foo"/> and
the props would look like { "": "foo" }.
3. Event handlers use @ as a prefix instead of on.
That's all I can name off of the top of my head, but that's the majority
of the difference in regards to syntax.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#254?email_source=notifications&email_token=AB6GLF2MK66KSPUTSGMIKHDQD5VI3A5CNFSM4IK2SFP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4AYH5Y#issuecomment-520193015>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6GLFZ2SUWHAKNVWQMDVGDQD5VI3ANCNFSM4IK2SFPQ>
.
|
There are no plans as of now to use TypeScript within Moon itself, and I may write types for the API — it's lower priority though. Right now I'm focusing on some official drivers, specifically the router and HTTP drivers. |
For TypeScript I was mostly referencing adding in a type definition for
people (like me) whose editors (VSCode) use that information automatically.
looking into grammars for VSCode. If I get something I'll link it on this
and submit a pull request to update the docs (add in a "Working with Moon
in your favorite editor" section or something)
…On Sat, Aug 10, 2019 at 6:50 PM Kabir Shah ***@***.***> wrote:
There are no plans as of now to use TypeScript within Moon itself, and I
may write types for the API — it's lower priority though. Right now I'm
focusing on some official drivers, specifically the router and HTTP drivers.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#254?email_source=notifications&email_token=AB6GLF3BG7NUSPVTJ4PLIGDQD5V5FA5CNFSM4IK2SFP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4AYKCY#issuecomment-520193291>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6GLFZKUTGAJERC3NFLBZTQD5V5FANCNFSM4IK2SFPQ>
.
|
Yup, type definitions might be added but aren't top priority for now.
That's awesome! Feel free to add it in the "View" section if you end up adding to the docs. If not, I'll be happy to write them as well. |
So I went through the tutorial and while a lot of Moon is very JSX / React-like, there are certain things (like the
<for>
in Moon, which are very different. This can cause some strange issues in code editors that are unaware of the element.If Moon is a serious development (which it appears to be) then creating some add-ons for syntax support for common editors (Sublime, VSCode, etc.) is likely a good idea. I did a search on the VSCode marketplace and didn't find anything. I've never personally build a syntax highlighter for VSCode yet, but I would be willing to look into how and perhaps start the project off.
The text was updated successfully, but these errors were encountered: