<p></p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rdipardo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rdipardo">@rdipardo</a> just to expand on <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/techee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/techee">@techee</a> comment above, the way the highlighting works is:</p>
<ol dir="auto">
<li>the lexer identifies syntactic entities and marks them with an enumeration (the <code class="notranslate">SCE_VISUALPROLOG_STRING_VERBATIM</code> values)</li>
<li>Geany maps those enumerations to a string name so humans can refer to it</li>
<li>Filetype files map that string to a style name, this is the mapping <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/techee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/techee">@techee</a> is talking about</li>
<li>Colour scheme files map style names to actual styles</li>
</ol>
<p dir="auto">This system allows colour schemes (aka themes) to just specify a single set of styles and have similar entities in all languages be styled the same, but it depends on filetypes files mapping the syntactic entities in a sensible manner.</p>
<p dir="auto">There is no style name for a "variable" because almost no language allows identifiers to be classed as variables (as distinct from functions and types and other stuff) purely syntactically, so no colour schemes will define a style for it, thats why <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/techee/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/techee">@techee</a> suggested the "parameter" style name.</p>
<p dir="auto">It is possible to map to a style in the filetype file, but that then won't change when the colour scheme changes, so a dark colour thats ok on light schemes may not be visible on dark schemes, so its always better to map to existing style names, even if their semantics are slightly different.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/3171#issuecomment-1111588566">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2NY6V6J7UO4PC2YKDVHHH6HANCNFSM5TSVVLDQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJY2XDIV4QMMRNGOJLTVHHH6HA5CNFSM5TSVVLD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIJAX5VQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/3171/c1111588566</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/3171#issuecomment-1111588566",
"url": "https://github.com/geany/geany/pull/3171#issuecomment-1111588566",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>