jupyter_client icon indicating copy to clipboard operation
jupyter_client copied to clipboard

Messaging spec details about codemirror_mode dict keys

Open gibiansky opened this issue 7 years ago • 2 comments

The messaging spec allows the codemirror_mode to be either a str or a dict. Is there any structure to the provided dict? If so, what is it (so that it can be parsed by clients)?

IPython responds with {"name": "ipython", "version": "3"}.

(BTW: I am filing a ton of small issues recently as I am implementing a spec-faithful and thoroughly tested binding to the spec, for easily creating both clients and kernels. If you would prefer to receive these issue reports (small bugs, spec inconsistencies, documentation requests) in any other manner, please let me know – I do not want to overload you guys with issues, and am happy to format the info in any way you want, including making one large issue with a lot of subpoints, or any other venue. Please let me know if you would prefer anything than what I am currently doing!)

gibiansky avatar Aug 02 '16 07:08 gibiansky

codemirror_mode is passed to codemirror via the mode option. Some modes take options, for example Python modes take version: 2 or 3, javascript takes json: true or false. Typically, they have one or more of: name, mime, mode for codemirror to identify the mode to load, then additional options that may configure the mode, which can be mode specific.

Thanks for filing these, they will be super useful to have as reference, and we can put them together into the docs eventually. Keep them coming!

minrk avatar Aug 02 '16 09:08 minrk

I'm happy to consume these as issues, thanks @gibiansky!

rgbkrk avatar Sep 07 '16 05:09 rgbkrk