<?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[need help with a style for a .cfg]]></title><description><![CDATA[<p dir="auto">Hi all I have a .cfg file that I am trying to edit<br />
it is hard to read<br />
here is what I get <img src="/assets/uploads/files/1738075548524-57f903a9-de81-4c07-b85d-d43cd23f06fd-image-resized.png" alt="57f903a9-de81-4c07-b85d-d43cd23f06fd-image.png" class=" img-fluid img-markdown" /><br />
here is what I am looking for<br />
<img src="/assets/uploads/files/1738074856809-accc2369-28a7-4724-8a85-7c6e0fc8778f-image.png" alt="accc2369-28a7-4724-8a85-7c6e0fc8778f-image.png" class=" img-fluid img-markdown" /><br />
I tried looking here<br />
<img src="/assets/uploads/files/1738076037069-53a5e31f-6dda-43a3-a3bf-a51e71f78db0-image-resized.png" alt="53a5e31f-6dda-43a3-a3bf-a51e71f78db0-image.png" class=" img-fluid img-markdown" /><br />
thanks for any help</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26589/need-help-with-a-style-for-a-cfg</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 23:03:45 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26589.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 28 Jan 2025 14:57:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to need help with a style for a .cfg on Tue, 28 Jan 2025 17:15:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beau-thompson" aria-label="Profile: Beau-Thompson">@<bdi>Beau-Thompson</bdi></a> ,</p>
<p dir="auto">You are in the right area:</p>
<ul>
<li>the <code>COMMENT</code> styles affect the lines that start with <code>#</code></li>
<li>the <code>SECTION</code> styles affect the <code>[QoLmod]</code> headers</li>
<li>the <code>ASSIGNMENT</code> styles affect the <code>=</code> between the key and value</li>
<li>the <code>KEY</code> styles affect the setting name (like <code>lastUsername</code>, to the left of the <code>=</code>)</li>
<li>the <code>DEFAULT</code> styles affect the value (to the right of the <code>=</code>)</li>
<li>I am not sure, but I am guessing the <code>DEFVAL</code> is an error condition (since it’s red in the default light-mode styler)</li>
</ul>
<p dir="auto">So you can set the colors for each of those styles to match your desires.</p>
<p dir="auto">The “Properties” language appears to not recognize comments at the end of a setting – that’s most likely because either the “Lexilla” library that Notepad++ uses for parsing the files doesn’t recognize that variant of the loosely-related slew of file-types that make up the “Properties” and “INI” filetypes, or because there’s an option for Lexilla’s “Properties” lexing which Notepad++ doesn’t use; I haven’t looked into which it is.  Either way, it would require a fix in Notepad++ and possibly a fix in Lexilla before it (though if it is an option, then you could make use of the PythonScript plugin, or similar, to automatically set that Lexilla option even though Notepad++ itself doesn’t).</p>
<p dir="auto">For the comment-after-assignment, there is a possible workaround:</p>
<ul>
<li>install EnhanceAnyLexer plugin</li>
<li>open your <code>QoLmod.cfg</code></li>
<li><strong>Plugins &gt; EnhanceAnyLanguage &gt; Enhance current language</strong></li>
<li>it will open <code>EnhanceAnyLexerConfig.ini</code> in your other View, and create a section called <code>[properties file</code>].  You could set that section to<pre><code>[properties file]
0x00aa00 = \S\s*\K#.*
</code></pre>
(making sure to not keep <code>excluded_styles</code> or to comment out that line)<br />
and save the <code>EnhanceAnyLexerConfig.ini</code></li>
<li>Going forward, the plugin should change the end-of-line <code># ....</code> comments to a shade of green.  (It will happen automatically the next time you open properties files, once the plugin config has been saved)</li>
</ul>
<p dir="auto">The limitation with EnhanceAnyLexer is that it cannot change bold/italics/underline status, and cannot change background color.  So it won’t exactly match the italicized normal COMMENTS style, but it will be close.</p>
<p dir="auto">-—<br />
<em>update: In the LexProps source code, I only see <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/ad79718fc80d2330c4407fc15196c4b311522147/lexilla/lexers/LexProps.cxx#L92" rel="nofollow ugc"><code>lexer.props.allow.initial.spaces</code></a> and <a href="https://github.com/notepad-plus-plus/notepad-plus-plus/blob/ad79718fc80d2330c4407fc15196c4b311522147/lexilla/lexers/LexProps.cxx#L92" rel="nofollow ugc"><code>fold.compact</code></a>, so as far as I can find, Lexilla does not provides a way to allow comments at the end of a line.  As a result, someone would have to <a href="https://github.com/ScintillaOrg/lexilla/issues" rel="nofollow ugc">request that the Lexilla project add that feature</a>, and they would have to implement and publish it, then Notepad++ would have to update to the most recent Lexilla.</em><br />
<em>Also, it appears that <code>DEFVAL</code> is used for the <code>@</code> symbol for “default value”, not an error condition.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/99406</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/99406</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 28 Jan 2025 17:15:37 GMT</pubDate></item></channel></rss>