Page 1 of 1
[xed] How do I update JavaScript colors?
Posted: Sat Oct 05, 2019 4:34 pm
by james-r
Methods such as
get coloured in blue, while others like
don't.
Is it possible to fix this manually?
I am using the Kate style scheme.
Re: [xed] How do I update JavaScript colors?
Posted: Sun Oct 20, 2019 12:46 am
by james-r
Bump.
Re: [xed] How do I update JavaScript colors?
Posted: Sat Nov 02, 2019 4:33 pm
by james-r
Bump.
Re: [xed] How do I update JavaScript colors?
Posted: Sun Nov 03, 2019 2:43 am
by smurphos
You can try modifying an existing color scheme, making your own or downloading some additional schemes..
The default scheme definitions can be found in
/usr/share/gtksourceview-3.0/styles
. They are plain text xml files so reasonably straightforward to edit as an end user.
If you copy one (or more) to somewhere in your home directory to act as a starting point for modification once done you can add your personalised scheme via xed's Install scheme button.
For javascript highlighting you many want to refer to the contents of
/usr/share/gtksourceview-3.0/language-specs/javascript.lang
to guide you in making your modified scheme.
Also see
https://wiki.gnome.org/Projects/GtkSour ... yleSchemes for some alternative schemes you can download and then manually add to xed.
Also these should also work -
https://www.gnome-look.org/browse/cat/279/
Re: [xed] How do I update JavaScript colors?
Posted: Sun Nov 03, 2019 3:32 am
by smurphos
Hi on a further look focusing on your specific question.....
/usr/share/gtksourceview-3.0/language-specs/javascript.lang
defines
substring
as a
function
, and maps functions to
def:builtin
, which
/usr/share/gtksourceview-3.0/styles/kate.xml
in turn sets as dark-blue.
forEach
is not defined at all in
/usr/share/gtksourceview-3.0/language-specs/javascript.lang
so maybe tweaking that file to add the definition is the actual fix to your issue.
Re: [xed] How do I update JavaScript colors?
Posted: Sun Nov 03, 2019 5:25 pm
by james-r
Thank you a lot.
It worked.