Syntax highlighting for text editor / IDE

105 views
Skip to first unread message

Sebastian M. Ernst

unread,
Jun 22, 2021, 2:54:54 PM6/22/21
to cython...@googlegroups.com
Hi all,

reviving a bit of an old discussion here [1]: I am curious what people
use / recommend for developing Cython in terms of good syntax
highlighting. I am mainly using Atom at the moment, but I am willing to
switch to whatever has better support for Cython syntax. I am used to
contemporary high-quality highlighting for languages like C, C++ and
Python, but when it comes to Cython, I somehow feel like having been
thrown back in time by a few decades ... no offense, I guess I have
simply been spoiled. Long story short: What would be your 2021 answer to
this question?

Atom has Cython support [2] but its highlighting is missing a lot of
language features, for instance distinct colors data types in function
signatures etc. The general Python support in Atom is excellent, and
there are even alternative parsers such as MagicPython [3].
Unfortunately, this package is missing Cython support [4].

VSCode does not offer native Cython support [5], but there is a 3rd
party package [6] which is, ironically, derived from MagicPython.
However, it is also missing a ton of Cython grammar and appears to be
abandoned.

I have had a brief look at screenshots of PyCharm's Cython integration.
At a first glace, it looks better than all of the solutions above, but I
am not sure if it is worth it. I am aware that Sublime, vim and Emacs
have Cython support, but I have yet not tested my way through them.

The *by far* best highlighting that I have seen is provided by Cython
itself via its "annotation" HTML output feature. Can any text editor or
IDE match this quality or actually integrate with the relevant parser?

Thanks,
Sebastian

---

1: https://groups.google.com/g/cython-users/c/2LztMqEZf9c/m/2l3zSVn4DQAJ
2: https://github.com/pierriko/language-cython
3: https://github.com/MagicStack/MagicPython
4: https://github.com/MagicStack/MagicPython/issues/116
5:
https://github.com/microsoft/vscode-python/issues/375#issuecomment-351146944
6: https://github.com/guyskk/language-cython-for-vscode

Blue

unread,
Jul 8, 2021, 4:37:05 PM7/8/21
to cython-users
Hello Sebastian,

I've had exactly the same issue in my Visual Studio Code experience and with linters such as flake8 which I use as my main linter.
Sadly I couldn't either find any sufficient extension either; to put it simply, someone will have to make it really.
Reply all
Reply to author
Forward
0 new messages