<p dir="auto">I'd like to ask/discuss if <code>self</code> could be added as a keyword in the geany syntax highlighter.</p>
<p dir="auto">While it is a convention and technically not a keyword, it is used as a defacto keyword.<br>
It is used and treated as a keyword in teaching materials, including the official<br>
python <a href="https://docs.python.org/3/library/dataclasses.html" rel="nofollow">documentation</a> whose syntax highlighter also highlights it as a keyword.</p>
<p dir="auto">Most syntax highlighters and text editors consider it to be a keyword.</p>
<p dir="auto"><a href="https://invent.kde.org/frameworks/syntax-highlighting/-/blob/master/data/syntax/python.xml" rel="nofollow">KDE/QT</a>: Kate/Kwrite, KDevelop, QTCreator, Featherpad, etc<br>
<a href="https://gitlab.gnome.org/GNOME/gtksourceview/-/blob/master/data/language-specs/python.lang" rel="nofollow">GtkSourceView</a>: Gedit, Gnome Text, Gnome Builder, Mousepad, etc<br>
CudaText, Lazarus, and other Lazarus or SynEdit based apps<br>
<a href="https://github.com/microsoft/vscode-textmate/blob/main/test-cases/themes/syntaxes/MagicPython.tmLanguage.json">VSCode</a><br>
Sublime Text<br>
PyCharm</p>
<p dir="auto">Anyway, I just wanted to put this up as a discussion. I set it as a draft for that reason.</p>
<p dir="auto">If it is able to be added, please let me know if my changes here are enough. I think I made<br>
changes in all the places I needed to.</p>
<p dir="auto">Thanks!</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/3023'>https://github.com/geany/geany/pull/3023</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/geany/geany/pull/3023/commits/c9cd53295f2bcdf06ed0e3e69c8de6df1f0e3377" class="commit-link">c9cd532</a>  Adds 'self' as keyword for Python syntax highlighting</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/geany/geany/pull/3023/files">3 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/3023/files#diff-dea4a4f527aef92d89f0a0139ad5faebdf23f070dd72be2633bbecee9e04b566">data/filedefs/filetypes.Cython.conf</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/3023/files#diff-f6446914af192febf701057c78a0cf252123dd6ce395ae507ae6eb1bf3d59443">data/filedefs/filetypes.python.in</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/3023/files#diff-d3a4fa9a89f4fa614475ea43e9ac42b19addb087139f87e4bdcf9dec22e9d0dc">scripts/update-python-identifiers.sh</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/3023.patch'>https://github.com/geany/geany/pull/3023.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/3023.diff'>https://github.com/geany/geany/pull/3023.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3023">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZVD5UQB23FCUYA6WDUOBV3HANCNFSM5I3Z6TUQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJZMYFYTBZMDGBG632TUOBV3HA5CNFSM5I3Z6TU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4P3ZH7XA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3023",
"url": "https://github.com/geany/geany/pull/3023",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>