menu

EdgeDB

Bringing state-of-the-art database technology to the masses.

Channels
Team

SDL pypments lexer

February 4, 2020 at 9:50pm

SDL pypments lexer

February 4, 2020 at 9:50pm
I'm trying to contribute to the edge|DB docs and ran into this error. I'm using Atom. I suspect I need to install some package globally but I'd rather get instruction for that. (I'd also be happy to add the instructions to the syntax highlighter package or a contributing guide elsewhere as appropriate)
No Pygments lexer found for "edgeql-repl"

February 4, 2020 at 10:34pm
There's this thing for Atom: https://atom.io/packages/edgedb
  • reply
  • like
Thanks Yury, I have that one installed and it works great. How do I (globally) install the pygments lexer(s) for edgedb? The rst preview in Atom is looking for that in order to render a preview.
  • reply
  • like
Right, Atom is probably using docutils to render a preview, and they need pygments. We have a pygments lexer here https://github.com/edgedb/edgedb/blob/master/edb/edgeql/pygments/__init__.py but I'm not sure how to enable it for Atom
Edited
  • reply
  • like
Understood, I'll see what I can do with that. Thank you
  • reply
  • like
Does Atom show unhighlighted code snippet or just crashes with an error?
  • reply
  • like

February 6, 2020 at 6:41pm
It's not rendering at all
  • reply
  • like
I tired to enable the lexer with the command line and got: python3 -m pygments -l edb/edgeql/pygments/__init__.py:EdgeQLLexer -X /usr/bin/python3: No module named pygments.__main__; 'pygments' is a package and cannot be directly executed
  • reply
  • like
Thanks for sharing this. I'll try to look at this over the weekend.
  • reply
  • like
What editor(s) are you guys using and with what rst previewers? I'm not opposed to using other tools, I'm just used to what I'm used to.
  • reply
  • like
I personally don't use a previewer. I just edit the file directly and then run make docs to verify it's correct / view the result.
  • reply
  • like