Gtksourceview5 lang vs style

Trying to get some custom colors for Rebol into a lang file, but with no luck.
what I’m doing:

Make a new rebol.lang file in ~/.local/share/gtksourceview-5/language-specs
Make a new test.xml file in ~/.local/share/gtksourceview-5/styles

Make the GtkSourceView load both in source for the application (Vala) & recompile it:

srcviewbuff.set_style_scheme(GtkSource.StyleSchemeManager.get_default().get_scheme("test"));
srcviewbuff.set_language(GtkSource.LanguageManager.get_default().get_language("rebol"));

Add new colors to style xml file to use in the lang file:

	<style name="rebol:control"			foreground="orange_2"/>
	<style name="rebol:logic"			foreground="orange_4"/>

Add to the references in the lang file styles:

	<styles>
		<style id="control"			name="control"			map-to="rebol:control"/>
		<style id="logic"			name="logic"			map-to="rebol:logic"/>
	</styles>

… but complains that rebol:control is undefined
What is the correct way to do this?
Also tried using “def:control”, but it didn’t like that either.

nvm, had to remove the map-tos, and make sure contexts were named differently to the styles… allgood now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.