Upshot: you'll need to merge SCE_VISUALPROLOG_ANONYMOUS and SCE_VISUALPROLOG_VARIABLE into one style to emulate what Vim does:
So should we do that?
Yes, that looks right. "Interpretive" styles like muted colours for singletons have some value for learners, but Prologists won't need visual aids.
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.
Your PR will need unit tests, and, to separate the mutually incompatible lexer options, those will need to be configured with conditional properties. There are no existing Prolog lexer tests, so a language-specific SciTE.properties
is also needed.
It's now possible to easily assign lexer properties to a definite number of diverse file types, like this:
lexer.*.pro;*.P;*.pl=visualprolog
The test file doesn't have to be a coherent program. Like AllStyles.rb, 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 @"verbatim string"
maps to SCE_VISUALPROLOG_STRING_VERBATIM
in the *.pro file only, whereas the same text in the *.pl file is lexed with @
styled as SCE_VISUALPROLOG_OPERATOR
and the rest as SCE_VISUALPROLOG_STRING
. Separating properties by file type can be done like this:
# Visual Prolog properties
match test01.pro
lexer.visualprolog.verbatim.strings=1
lexer.visualprolog.backquoted.strings=0
# ISO/SWI-Prolog properties
match test01.pl
lexer.visualprolog.verbatim.strings=0
lexer.visualprolog.backquoted.strings=1
You can simply copy the keyword groups from SciTE's default configuration, and assign them all to the *.pro extension. Leftover keyword groups can be filled with SWI-Prolog lexemes and assigned to the *.pl extension.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.