-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Structured Text (IEC 61131-3) #1923
Comments
Unfortunately, the documentation of adding a new language is lacking, so here is a brief summary of my usual workflow when adding a new language.
I hope this helps. If you have any questions, feel free to ask. |
@RunDevelopment You should take that comment and copy it into the docs and PR it. That's a really great summary! |
It would be great if IEC 61131-3 is supported! I wanted to port the Highlight.js version over but have no idea how it works. |
I've created highlight.js support for ST https://github.com/highlightjs/highlightjs-structured-text It works like any other language in hljs. Tell me more about what environment you are and I'll suggest how to highlight. I highlight with this my ST book. I would create highlights for prism but there is no documentation and I do not have time to go through all the source code to get how it works. |
@Serhioromano Thanks for the reply. Actually, I'm using Docusaurus v2 which has PrismJS as its syntax highlight engine. I tried to use Highlight.js along with PrismJS but:
I have figured out a way to add additional language to PrismJS in Docusaurus, but I don't know the correct definition of the language. So it would be great if ST can be supported by PrismJS! EDIT: By the way, there's documentation on adding a new language here: https://prismjs.com/extending.html I've already added some for ST in my project with this guide, but I doubt that they're correct 😂 |
@Serhioromano Could you please tell what additional information you need and I'll try to add it. |
@maddie I see. let me see if I can find some time to look through. @RunDevelopment right now I find everything I would need to add ST support, except time :) I'll see if I can find some time to go through. |
@RunDevelopment I started to look at it. Generated simple file and run npx gulp. It generated files I think those that are highlighted should not be PR, right? Should those be added to |
Nope. All generated files (including the highlighted ones) have to be in your PR or else the build will fail. All except |
I've added PR but it has conflicts now n those files. |
@Serhioromano Thanks a lot for your contribution! |
Closed by #2311. |
Language
Language for programming PLC one of the 5 in IEC 61131-3 standard.
Additional resources
The language specification is not public for free. I wanted to contribute it. I have already contributed support for this language for highlight.js, Monaco editor, VS Code extension. Unfortunately, I cannot get how to make it here. I mean I understood file syntax but is there a deve playground? How I can watch the progress while development? Can I run some server so that after changes JS file I could simply update in the browser and see a result? Or I have to compile it first?
What is the development flow?
The text was updated successfully, but these errors were encountered: