That is interesting, so we have at least one active gtksourceview user. GtkSourceView was hard for me four years ago when I wrote the Ned editor. Understanding the API was really not easy, and unfortunately I forget all of it. Looking at the gedit sources may help, but I don’t know how outdated that sources are.
For GTK version, I would really suggest using GTK4 now, as it is official released already. For my Gentoo it is not available as a package, but there are other ways to install it, I did it from gitlab source.
You may have your reasons why you use Python – for an editor where performance is not that important it may be OK. I had used Ruby for some years. Now I think there exists many much more interesting new languages, and most have GTK support.
One question: Have you already find out how we can set the font for a sourceview widget in a non deprecated way? I regard the CSS way as described in the Salewski book as very laborious: http://ssalewski.de/gtkprogramming.html#_fontchooserdialog. And storing the selected font with GSettings seems to be not possible in one single line also
Well there is an example for setting the font in the GtkSourceView API nearly to the top:
So I think that CSS is indeed the way – we have to construct the CSS string from the data available from the FontChooserDialog.
And maybe another question as your main target is Python: Have you already an idea how we can nicely display indented blocks, so that indent levels are nicely viewable? Four years ago there was no way for gtksourceview, while VS-Code did it very nice.