Alexey-T / CudaText

Cross-platform text editor, written in Free Pascal
Mozilla Public License 2.0
2.4k stars 167 forks source link

Put named literals for Python into separate group for lexer. #5431

Closed the-allanc closed 3 months ago

the-allanc commented 3 months ago

I've been trying to make the syntax highlighting more like the one used by Xed (the default text editor for Linux Mint) which uses GtkSourceView.

Currently CudaText defines named literal objects as "types" - even though they are instances of a Python type. A lot (maybe all) of the types mentioned are also functions, but these objects cannot be invoked in the same way.

GtkSourceView defines these literals separately to builtin functions / types - so I've defined them separately as a new group too. (The NotImplemented object was also incorrectly defined as an error, which it isn't.)

It uses the same theme style as for types, so existing themes should look the same for most users.