<p></p>
<p dir="auto"><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>,</p>
<blockquote>
<blockquote>
<p dir="auto">Upshot: you'll need to merge SCE_VISUALPROLOG_ANONYMOUS and SCE_VISUALPROLOG_VARIABLE into one style to emulate what Vim does:</p>
</blockquote>
<p dir="auto">So should we do that?</p>
</blockquote>
<p dir="auto">Yes, that looks right. "Interpretive" styles like muted colours for singletons have some value for learners, but Prologists won't need visual aids.</p>
<blockquote>
<p dir="auto">There seem to be many lexers having configuration options like this so I don't expect there would be a problem upstream. If it works as expected here, I'll send a patch upstream.</p>
</blockquote>
<p dir="auto">Your PR will need <a href="https://github.com/ScintillaOrg/lexilla/blob/master/test#readme">unit tests</a>, and, to separate the mutually incompatible lexer options, those will need to be configured with <a href="https://github.com/ScintillaOrg/lexilla/commit/1499a42c12e454e8d6e3c1a6ada1ddc3a52e0407">conditional properties</a>. There are no existing Prolog lexer tests, so a language-specific <code class="notranslate">SciTE.properties</code> is also needed.</p>
<p dir="auto">It's <a href="https://github.com/ScintillaOrg/lexilla/commit/ef547f878b41e45612c7f14d0a8bdc939670572f">now possible</a> to easily assign lexer properties to a definite number of diverse file types, like this:</p>
<pre class="notranslate"><code class="notranslate">lexer.*.pro;*.P;*.pl=visualprolog
</code></pre>
<p dir="auto">The test file doesn't have to be a coherent program. Like <a href="https://github.com/ScintillaOrg/lexilla/blob/master/test/examples/ruby/AllStyles.rb">AllStyles.rb</a>, it can simply iterate all the lexical classes. The same content can be saved twice, once each with the *.pro and *.pl extensions. The feature under test is that, for example, a sequence like <code class="notranslate">@"verbatim string"</code> maps to <code class="notranslate">SCE_VISUALPROLOG_STRING_VERBATIM</code> in the *.pro file only, whereas the same text in the *.pl file is lexed with <code class="notranslate">@</code> styled as <code class="notranslate">SCE_VISUALPROLOG_OPERATOR</code> and the rest as <code class="notranslate">SCE_VISUALPROLOG_STRING</code>.  Separating properties <a href="https://github.com/ScintillaOrg/lexilla/commit/2c9e00442f1876254694ebb2fd6ae4f9ab1a5662">by file type</a> can be done like this:</p>
<div class="highlight highlight-source-ini"><pre><span class="pl-c"><span class="pl-c">#</span> Visual Prolog properties</span>
match test01.pro
    <span class="pl-k">lexer.visualprolog.verbatim.strings</span>=1
    <span class="pl-k">lexer.visualprolog.backquoted.strings</span>=0

<span class="pl-c"><span class="pl-c">#</span> ISO/SWI-Prolog properties</span>
match test01.pl
    <span class="pl-k">lexer.visualprolog.verbatim.strings</span>=0
    <span class="pl-k">lexer.visualprolog.backquoted.strings</span>=1</pre></div>
<p dir="auto">You can simply copy the keyword groups from SciTE's <a href="https://sourceforge.net/p/scintilla/scite/ci/default/tree/src/visualprolog.properties" rel="nofollow">default configuration</a>, and assign them all to the *.pro extension. Leftover keyword groups can be filled with SWI-Prolog lexemes and assigned to the *.pl extension.</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-1119331035">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ3TBOZAIV2OIWA2J6DVITCF5ANCNFSM5TSVVLDQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJZ745YPRLZUJ5TYWKTVITCF5A5CNFSM5TSVVLD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIK32FWY.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/c1119331035</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-1119331035",
"url": "https://github.com/geany/geany/pull/3171#issuecomment-1119331035",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>