Skip to content
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

Yuescript #1134

Closed
ShalokShalom opened this issue Jan 17, 2022 · 9 comments
Closed

Yuescript #1134

ShalokShalom opened this issue Jan 17, 2022 · 9 comments
Assignees

Comments

@ShalokShalom
Copy link

ShalokShalom commented Jan 17, 2022

Yuescript is an extended and actively developed version of Moonscript

Is there any chance, to add support for it?

@pkulchenko
Copy link
Owner

There are three things that are generally included in "support" for a particular language/interpreter:

  1. Integration with the IDE to run,
  2. Syntax-highlighting, and
  3. Debugging.

There is moonscript plugin that implements 1 and 3. The debugging support is implemented using linemap in MobDebug, so if Yuescript is using something similar, then it should be possible to integrate it the same way.

For syntax-highlighting someone can use the moonscript lexer and extend it to cover Yuescript syntax. The lexer can then be registered with editor.specmap table to link a specific file extension to the Yuescript lexer.

It's also possible to package everything within one plugin (including the lexer) using ide:AddLexer command.

I can help with any questions/issues that may arise, but you'd need to find someone to do and test this.

@ShalokShalom
Copy link
Author

Well, 1 is already implemented, I guess, it simply compiles to Lua.

2 is not so different from Moon, it supports just a handful of new features (implicit objects, pipes etc)

3 Is not so important (to me)

@billboardsDAO
Copy link

To syntax-highlighting Yuescript files add this line in Settings: System (Edit menu/Preferences):

ide.config.editor.specmap.yue = "moonscript"

and restart IDE

@pkulchenko
Copy link
Owner

@billboardsDAO, thank you for the suggestion! Also, you can drop ide.config, so editor.specmap.yue = "moonscript" should work as well.

@ShalokShalom
Copy link
Author

Can we make this default?

@pkulchenko
Copy link
Owner

Pushed the change for it. @ShalokShalom, is that enough for you for now?

@ShalokShalom
Copy link
Author

Thanks a lot

@impul-so
Copy link

Hi @pkulchenko
Could you add the conf extension (nginx/openresty) using css syntax as default? It works well and helps :)

editor.specmap.conf = "css"

@ShalokShalom
Copy link
Author

What does this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants