1

I'm trying to create a code editor via monaco loader which is going to do all of the appropriate formatting and highlighting for .g-code files. I understand that for this to work I need g-code as the language but g-code isn't on the list of options. Does anyone know where I can get g-code rules and how to implement them into my editor?

If anyone has already made something like that and is willing to share it then I would much appreciate it.

Peter
  • 2,796
  • 1
  • 17
  • 29
sjjk001
  • 175
  • 2
  • 12

1 Answers1

1

Does anyone know where I can get gcode rules and how to implement them into my editor?

Read the code in the vscode-gcode-syntax repo very carefully as it is a great reference you can use to implement your own monarch language syntax.

Useful Resources to get started:

Peter
  • 2,796
  • 1
  • 17
  • 29
  • 1
    Got it, I have found a variety of g-code syntax rules at least for highlighting and now I am trying to implement them through monaco-editor new language registration tool - https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages – sjjk001 Aug 11 '20 at 08:54