<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[custom syntax highlighting [JS]]]></title><description><![CDATA[<p dir="auto">I would like to create custom syntax highlighting for</p>
<pre><code>chrome.storage.local.get
chrome.i18n
chrome.runtime.sendMessage
//etc...   
</code></pre>
<p dir="auto">and to keep defined coloring for keywords, so that those custom ones stick out in some different color (eg. bluish).<br />
So far I only manage to add <a href="http://i.imgur.com/Tpuaa0p.png" rel="nofollow ugc">my words to KEYWORDS</a>, but in that case, color is the same like the <a href="http://i.imgur.com/nAljHbD.png" rel="nofollow ugc">rest of the keywords</a>.<br />
So how to create my own syntax highlighting for custom keywords?<br />
language: JavaScript<br />
theme from SS: Waher-style</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/11561/custom-syntax-highlighting-js</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 19:54:04 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/11561.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 03 Apr 2016 08:29:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Wed, 06 Apr 2016 09:57:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a><br />
ok, tnx again<br />
at least I didn’t screw it :)<br />
cheers</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15179</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15179</guid><dc:creator><![CDATA[Wolf War]]></dc:creator><pubDate>Wed, 06 Apr 2016 09:57:40 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Tue, 05 Apr 2016 23:46:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3749">@Wolf-War</a></p>
<p dir="auto">ok, short answer, javascript doesn’t support it.</p>
<p dir="auto">Longer answer javascript doesn’t support all keyword class names, which would be</p>
<ul>
<li>instre1</li>
<li>instre2</li>
<li>type1</li>
<li>type2</li>
<li>type3</li>
<li>type4</li>
<li>type5</li>
</ul>
<p dir="auto">It only supports instre1, instre2 and type1 - hardcoded in source (),<br />
the same applies to the styles names like number, word, keyword …<br />
You can define a new style name but it never gets used.</p>
<p dir="auto">Beside this, waher.xml has to name  it javascript.js</p>
<pre><code>&lt;LexerType name="javascript.js" desc="JavaScript" ext=""&gt;
</code></pre>
<p dir="auto">as javascript has become the embedded one.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15176</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15176</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Tue, 05 Apr 2016 23:46:46 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Tue, 05 Apr 2016 09:32:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a><br />
thank you for confirming this</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15159</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15159</guid><dc:creator><![CDATA[Wolf War]]></dc:creator><pubDate>Tue, 05 Apr 2016 09:32:48 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Tue, 05 Apr 2016 09:21:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3749">@Wolf-War</a></p>
<p dir="auto">you are right, it doesn’t work with javascript.<br />
First I tried my python changes, which worked fine but changing the same for javascript doesn’t work.<br />
As you said, we are seeing the new keywords but different coloring doesn’t happen.</p>
<p dir="auto">Need to investigate this.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15157</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15157</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Tue, 05 Apr 2016 09:21:11 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Tue, 05 Apr 2016 08:33:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a><br />
I’m not sure where I download it from, long time ago<br />
<a href="https://drive.google.com/file/d/0By0ST0eW-ZW9bmxsYnJyUms0ZXM/view?usp=sharing" rel="nofollow ugc">but here is the file that I’m using </a>(uploaded to Gdrive)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15155</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15155</guid><dc:creator><![CDATA[Wolf War]]></dc:creator><pubDate>Tue, 05 Apr 2016 08:33:18 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Tue, 05 Apr 2016 07:33:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3749">@Wolf-War</a><br />
can you point me to the location from where you’ve downloaded the waher style?<br />
I would give it a try to test and see what the problem is.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15153</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15153</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Tue, 05 Apr 2016 07:33:38 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Tue, 05 Apr 2016 07:31:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a><br />
thanx for your effort<br />
yes, I did that but in actual code there is not effect<br />
in <strong>Style Configurator</strong> everything is recognized (MY_KEYWORDS)  but the words are not colored (green)</p>
<p dir="auto"><img src="https://camo.nodebb.org/21f8e0cea305d3ad155b390cbd1cba85df574e04?url=http%3A%2F%2Fi.imgur.com%2F2dPBFYD.png" alt="Alt" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/15152</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15152</guid><dc:creator><![CDATA[Wolf War]]></dc:creator><pubDate>Tue, 05 Apr 2016 07:31:08 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Mon, 04 Apr 2016 22:27:03 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3749">@Wolf-War</a>,</p>
<p dir="auto">as an example what I have done for python</p>
<p dir="auto">in langs.xml</p>
<pre><code>    &lt;Language name="python" ext="py pyw" commentLine="#"&gt;
        &lt;Keywords name="instre1"&gt;and as assert break class continue def del elif else except exec False finally for from global if import in is lambda None not or pass print raise return True try while with yield&lt;/Keywords&gt;
        &lt;Keywords name="instre2"&gt;editor editor1 editor2 notepad console&lt;/Keywords&gt;
    &lt;/Language&gt;
</code></pre>
<p dir="auto">I added the a second keywords tag and named it instre2 with a given list of keywords.</p>
<p dir="auto">In Dark2012.xml (the theme that I use) I modified</p>
<pre><code>    &lt;LexerType name="python" desc="Python" ext=""&gt;
        &lt;WordsStyle name="DEFAULT" styleID="0" fgColor="C8C8C8" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="COMMENTLINE" styleID="1" fgColor="57A64A" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="NUMBER" styleID="2" fgColor="BD63C5" bgColor="1E1E1E" fontName="" fontStyle="1" fontSize="" /&gt;
        &lt;WordsStyle name="STRING" styleID="3" fgColor="D69D85" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="CHARACTER" styleID="4" fgColor="D69D85" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="KEYWORDS" styleID="5" fgColor="367DC6" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" keywordClass="instre1" /&gt;
        &lt;WordsStyle name="TRIPLE" styleID="6" fgColor="C8C8C8" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="TRIPLEDOUBLE" styleID="7" fgColor="C8C8C8" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="CLASSNAME" styleID="8" fgColor="8080FF" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="DEFNAME" styleID="9" fgColor="8080FF" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="OPERATOR" styleID="10" fgColor="FF8000" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="IDENTIFIER" styleID="11" fgColor="8DA6CE" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="COMMENTBLOCK" styleID="12" fgColor="57A64A" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="DECORATOR" styleID="13" fgColor="D69D85" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" /&gt;
        &lt;WordsStyle name="USERDEFINED" styleID="14" fgColor="D69D85" bgColor="1E1E1E" fontName="" fontStyle="0" fontSize="" keywordClass="instre2"/&gt;
    &lt;/LexerType&gt;
</code></pre>
<p dir="auto">the lexertype tag by adding a new word style with name USERDEFINED (can be any other name), styleID=14 (which was the next in row)<br />
and added keywordClass=“instre2” to reflect the changes in langs.xml.</p>
<p dir="auto">Did you do the same?</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15143</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15143</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Mon, 04 Apr 2016 22:27:03 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Mon, 04 Apr 2016 22:15:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a><br />
hmm I tried but without luck</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15141</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15141</guid><dc:creator><![CDATA[Wolf War]]></dc:creator><pubDate>Mon, 04 Apr 2016 22:15:07 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Sun, 03 Apr 2016 22:02:32 GMT]]></title><description><![CDATA[<p dir="auto">Yes,  in langs.xml add a new keywords tag with your keywords.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15112</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15112</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Sun, 03 Apr 2016 22:02:32 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Sun, 03 Apr 2016 20:19:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a> said:</p>
<blockquote>
<p dir="auto">keywordClass=“instreX”</p>
</blockquote>
<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a><br />
I’ve manged to do something but not good enough<br />
In theme that I’m using <strong>Waher-style</strong> I added new <em>WordsStyle</em> tag with unique name and ID…<br />
and it is recognized by app style editor (shown in list as MY_KEYWORDS)<br />
<a href="http://prntscr.com/anqf7m" rel="nofollow ugc">http://prntscr.com/anqf7m</a></p>
<p dir="auto">but any word that I add to it it, behaves like old predefined keywords style<br />
<a href="http://prntscr.com/anqfw5" rel="nofollow ugc">http://prntscr.com/anqfw5</a><br />
in this case <em>chrome</em> should be green as my costume keyword, but its colored as default keyword</p>
<p dir="auto">I think that klassKeyword plays roll in it… if I add <strong>keywordClass=“instre1”</strong> it’s like old keyword<br />
if I change <strong>instre</strong> to another number, no coloring… do I need to define that new instre eg <strong>instre2</strong> somwhere else?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15109</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15109</guid><dc:creator><![CDATA[Wolf War]]></dc:creator><pubDate>Sun, 03 Apr 2016 20:19:09 GMT</pubDate></item><item><title><![CDATA[Reply to custom syntax highlighting [JS] on Sun, 03 Apr 2016 18:28:23 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3749">@Wolf-War</a>,</p>
<p dir="auto">in langs.xml add a new keywords tag with your keywords.<br />
Depending if you use a different theme then it is your_theme.xml or default  stylers.xml add a new Wordstyle tag.<br />
Name and styleID must be unique. Add keywordClass=“instreX” at the end of the tag. X needs to be replaced with<br />
the actual number, of course.</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/15106</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/15106</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Sun, 03 Apr 2016 18:28:23 GMT</pubDate></item></channel></rss>