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

Add support for RepRapFirmware meta G-code keywords #56

Open
chrishamm opened this issue Nov 28, 2022 · 9 comments
Open

Add support for RepRapFirmware meta G-code keywords #56

chrishamm opened this issue Nov 28, 2022 · 9 comments
Assignees
Labels
feature New feature or request highlighting Syntax highlighting issues or changes stale-issue
Projects

Comments

@chrishamm
Copy link

chrishamm commented Nov 28, 2022

First of all, thank you very much for this extension - it looks great and if possible, I would really like to use the syntax highlighting from this project with Monaco in a web application to provide a nicer G-code editor.

What I've been missing is briefly mentioned in #44: Syntax highlighting for RepRapFirmware G-code keywords and expressions.

With RepRapFirmware it is possible to use variables (var, global, set), conditional code flow (if, elif, else, while, abort, break), to output generic messages (echo), and to use dynamic expression parameters (e.g. G1 X{100 * 0.3}, everything in curly braces is evaluated on execution). The set of keywords is relatively small and well-documented here: https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands

Is there any way this could be added to a future version or can you point me to the right bits that need to be changed?

@github-actions
Copy link

Hello and welcome! Thanks for creating your first issue! Someone from our community will get back to you soon!

@mikecentola mikecentola self-assigned this Dec 9, 2022
@mikecentola mikecentola added feature New feature or request highlighting Syntax highlighting issues or changes labels Dec 9, 2022
@mikecentola
Copy link
Member

I think if I can find a way to change the syntax highlighting based on the machine type chosen in the configuration settings, then I can probably make this work! I'll put it on the schedule for v0.8, but I might have to push it to v0.9.

@mikecentola mikecentola added this to TODO in v0.8 via automation Dec 9, 2022
@chrishamm
Copy link
Author

Because our old editor component was basically falling apart, I've decided to built my own syntax highlighting from scratch. You can find it here in case you want to adopt parts of it in vscode-gcode-syntax: https://github.com/Duet3D/DuetWebControl/blob/v3.5-dev/src/utils/monaco-gcode.ts

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

This issue has been automatically marked as stale because it has not had recent activity.

@chrishamm
Copy link
Author

The highlighting file works quite nicely, I may make some more minor changes before our next 3.5 release but it should be error-free.

@mikecentola
Copy link
Member

@chrishamm thanks for your work on that. I've been offline for quite some time now with other life issues, so I'm going to start playing catchup on this extension. I'll see if there is anything I can incorporate into this.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity.

@chrishamm
Copy link
Author

There have been two minor changes in my source file since your last comment, just FYI.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request highlighting Syntax highlighting issues or changes stale-issue
Projects
v0.8
  
TODO
Development

No branches or pull requests

2 participants