GtkSourceView is used by GTK+ applications for syntax highlight. It would be great to have "language-spec" (syntax highlight) for gentoo-related files, just as in nano, vim etc.
Feel free to submit patches for individual ebuilds; nothing we could fix here. Thanks.
Created attachment 103051 [details] gentoo.lang This is a first try in a gentoo-specific .lang file. Issues: - It's usefullness should be mitigated because AFAIK there is no "ebuild" MIME type, so the user will have to choose manually the highlight mode; - Somehow some styles don't get any color by default; - No syntax highlight for /etc/portage/packages.* files.
Maybe this is enough? The file should be installed in /usr/share/gtksourceview-1.0/language-specs/
(In reply to comment #3) > Maybe this is enough? > > The file should be installed in /usr/share/gtksourceview-1.0/language-specs/ By which ebuild?
I thougth on gtksourceview. gentoo-syntax is vim-specific, and gentoo.nanorc comes with nano itself.
Would be nice if this could be done :) I need the language-file - and having an own overlay-ebuild is not the best solution ;)
(In reply to comment #6) > Would be nice if this could be done :) I have one but it doesn't work 100%. E-mail me if you want it.
(In reply to comment #7) > (In reply to comment #6) > > Would be nice if this could be done :) > I have one but it doesn't work 100%. E-mail me if you want it. What do you mean? - An ebuild? - I already have a working one. Or a language file different from the one above?
(In reply to comment #8) I have another .lang file, not much better than that. I have to get in touch with gtksourceview people to get this working.
(In reply to comment #9) > I have another .lang file, not much better than that. I have to get in touch > with gtksourceview people to get this working. Hm .. the above one is working mostly as it should ;) - with "could be done" I meant: the language file should make its way into portage ;)
Has anyone contacted upstream about this? Thanks
Come on people :) This is a nice piece of work, don't let it bit rot here. Someone please find it a home in gedit's tarballs where it belongs. Thanks
gedit is most probably the wrong place for it ... it should be in the gtksourceview ebuild ...
Indeed, my bad. Either way, it shouldn't be in our ebuilds, it should be in upstream. This is where it makes most sense.
Okay, I've added this to gtksourceview-1.8.5-r1. Sorry for the delay... Note that this .lang file won't work with gtksourceview-2.0, so this is limited to gnome 2.18 and below, until someone updates it to 2.0.
<dev-util/portatosourceview-2.16.1-r1 also contains the lang-file. Thus these versions should be blocked in the new ebuild. (sorry for the inconvenience - forgot to mention it in here =|)
(In reply to comment #16) > <dev-util/portatosourceview-2.16.1-r1 also contains the lang-file. Thus these > versions should be blocked in the new ebuild. It isn't portatosourceview's business to install things into /usr/share/gtksourceview-1.0 (which is gtksourceview's share file namespace), really. I wouldn't like to see any kind of blocks on some third party library in a GNOME library which is really their problem, not ours. Couldn't it have installed it in /usr/share/portatosourceview and load the syntax files from its own namespace in addition to gtksourceviews? If that's not possible, then maybe this lang file installing was justified, I give you that :)
(In reply to comment #17) > Couldn't it have > installed it in /usr/share/portatosourceview and load the syntax files from its > own namespace in addition to gtksourceviews? If that's not possible, then maybe > this lang file installing was justified, I give you that :) To be honest: I don't know, whether this would be possible - I haven't thought about it. But you are right, it wasn't good practice ...
It's alright, I blocked. Serves them right, being blocked, for violating our namespace. :)
Created attachment 132345 [details] gentoo.lang for gtksourceview-2 I've rewritten the gentoo.lang file for gtksourceview-2 as they have established a new language file format. It now uses the predefined sh.lang instead of defining all shell things by itself. Unfortunatly the sh.lang is not the best one (for example ${VAR/foo/bar} is not highlighted correctly etc), but I hope that it will get enhanced by the gtksourceview guys =). (Perhaps one can reopen the bug ;))
I think it makes sense to just create a new bug for gtksourceview2's case.
(In reply to comment #21) > I think it makes sense to just create a new bug for gtksourceview2's case. > Ok - done -> bug #194462 Note that I renamed the lang file to "ebuild.lang" in the other bug. :)