[Github-comments] [geany/geany] Draft: Adds 'self' as keyword for Python syntax highlighting (PR #3023)

newhoa notifications at xxxxx
Sat Nov 27 05:44:19 UTC 2021


I'd like to ask/discuss if `self` could be added as a keyword in the geany syntax highlighter.

While it is a convention and technically not a keyword, it is used as a defacto keyword.
It is used and treated as a keyword in teaching materials, including the official
python [documentation](https://docs.python.org/3/library/dataclasses.html) whose syntax highlighter also highlights it as a keyword.

Most syntax highlighters and text editors consider it to be a keyword.

[KDE/QT](https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/data/syntax/python.xml): Kate/Kwrite, KDevelop, QTCreator, Featherpad, etc
[GtkSourceView](https://gitlab.gnome.org/GNOME/gtksourceview/-/blob/master/data/language-specs/python.lang): Gedit, Gnome Text, Gnome Builder, Mousepad, etc
CudaText, Lazarus, and other Lazarus or SynEdit based apps
[VSCode](https://github.com/microsoft/vscode-textmate/blob/main/test-cases/themes/syntaxes/MagicPython.tmLanguage.json)
Sublime Text
PyCharm 

Anyway, I just wanted to put this up as a discussion. I set it as a draft for that reason.

If it is able to be added, please let me know if my changes here are enough. I think I made
changes in all the places I needed to.

Thanks!
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/3023

-- Commit Summary --

  * Adds 'self' as keyword for Python syntax highlighting

-- File Changes --

    M data/filedefs/filetypes.Cython.conf (2)
    M data/filedefs/filetypes.python.in (2)
    M scripts/update-python-identifiers.sh (2)

-- Patch Links --

https://github.com/geany/geany/pull/3023.patch
https://github.com/geany/geany/pull/3023.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3023
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211126/d6dcd0bd/attachment.htm>


More information about the Github-comments mailing list