sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

syntax highlighting for GAP #1834

Open haraldschilly opened 7 years ago

haraldschilly commented 7 years ago

probably create a syntax highlighting rule file for codemirror, or make this an upstream task at the gap project

williamstein commented 7 years ago
  1. Get some of your favorite GAP code and try it with various modes at http://codemirror.net/mode/index.html
  2. Tell us which looks best.
  3. We can then easily make that mode get used for .g files.

With over 100 languages already, odds are that GAP is very similar to an existing language (e.g., PASCAL?).

haraldschilly commented 7 years ago

The best way to go forward seems to take the python highlighting and add all those gap keywords and see how that works out. So, what's the full list of keywords and what's a good (long and involved) gap source code to test with?

slel commented 6 years ago

See Manuel Martins's GAP syntax highlighting for CodeMirror: https://github.com/mcmartins/CodeMirror

slel commented 6 years ago

Related:

slel commented 5 years ago

cc @markuspf @mcmartins

mcmartins commented 5 years ago

The version currently in my own repo is outdated. The latest version of the gap mode for CodeMirror is distributed with the JupyterKernel: https://github.com/gap-packages/JupyterKernel/tree/master/etc/gap-mode

slel commented 5 years ago

Thanks for the heads-up @mcmartins.

At this point, GAP syntax highlighting seems to work when using GAP's JupyterKernel in Plain Jupyter, but not in JupyterLab or CoCalc-Jupyter.