3

I am new to both JupyterLabs and Codemirror, However, I have a new simplemode language syntax definition that I would like to apply for Clingo. I based the file off the Dockerfile mode. However, I do not know how to include this file in the build for JupyterLab. I do manage to get JL to build following the instructions here, but I'm not sure how to include my file in the build process.

line 11 in packages/codemirror/src/mode.ts has:

import 'codemirror/mode/meta';

which kind of lead me to believe if I included a line in the meta.js file, and dropped my mode folder in that directory, that it would be found during the build, but this doesn't seem to be the case.

Any help would be very much appreciated. Thank you.

sosukeinu
  • 379
  • 4
  • 16
  • By Clingo are you referring to the Answer Set Programming modules that can be installed with `conda install -c potassco clingo`? see https://anaconda.org/potassco/clingo and https://potassco.org/ – peschü Mar 02 '18 at 10:07
  • Yes, that is correct. Planning on working with some .lp files, and would like to have them correctly highlighted. – sosukeinu Mar 02 '18 at 13:03
  • I am not sure you will get syntax highlighting by installing the clingo modules. And I don't know how to install a package in JupyterLab but maybe you can use conda/anaconda. The clingo modules are a bit complicated to build otherwise (quite a few dependencies). – peschü Mar 03 '18 at 14:27
  • I’m sorry, I think maybe I wasn’t being clear. I already have clingo modules installed, and everything is fine as far as that goes. I’m just looking at using JupyterLabs to do some of the clingo programming. (Mainly because of the integration of clingo with python, and the ability to do some Answer Set programming in notebooks.) However, I will still need to create some `.lp` files in the JupyterLab text editor (which uses CodeMirror). I already have a CodeMirror mode file, which should introduce the correct syntax highlighting for `.lp`files. All I’m missing is how to install this. – sosukeinu Mar 03 '18 at 14:34
  • Does JupyterLab have a `Prolog` syntax highlighting? It is similar to ASP syntax and might get you quite far. Other ASP syntax highlighters have been implemented in the SeaLion software and you can find several other syntax highlighters online if you google for `answer set programming syntax highlighter` (do not use "ASP" or you will find active server pages). – peschü Mar 04 '18 at 09:49

0 Answers0