Permalink
Browse files

Fix CodeMirror highlight for directives and use a theme that supports…

… variables
  • Loading branch information...
pmoura committed Dec 5, 2018
1 parent d2085e9 commit cc17ae16f68016ce84cf9b23db94b4f6af94b851
Showing with 8 additions and 8 deletions.
  1. +2 −2 coding/codemirror/index.html
  2. +6 −6 coding/codemirror/logtalk.js
@@ -5,7 +5,7 @@
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../theme/twilight.css">
<link rel="stylesheet" href="../../theme/ambiance.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>
<script src="logtalk.js"></script>
@@ -475,7 +475,7 @@ <h2>Logtalk mode</h2>
lineNumbers: true,
matchBrackets: true,
extraKeys: {"Tab": "indentAuto"},
theme: "twilight"
theme: "ambiance"
});
</script>
@@ -488,33 +488,33 @@ CodeMirror.defineMode("logtalk", function(cmCfg, modeCfg) {
regex: '%.*$\\n?' },
{ todo: 'fix grouping',
token:
[ 'storage.type.opening.logtalk',
[ 'meta.type.opening.logtalk',
'punctuation.definition.storage.type.logtalk' ],
regex: ':-\\s(?:object|protocol|category|module)(?=[(])' },
{ todo: 'fix grouping',
token:
[ 'storage.type.closing.logtalk',
[ 'meta.type.closing.logtalk',
'punctuation.definition.storage.type.logtalk' ],
regex: ':-\\send_(?:object|protocol|category)(?=[.])' },
{ caseInsensitive: false,
token: 'storage.type.relations.logtalk',
token: 'meta.type.relations.logtalk',
regex: '\\b(?:complements|extends|i(?:nstantiates|mp(?:orts|lements))|specializes)(?=[(])' },
{ caseInsensitive: false,
todo: 'fix grouping',
token:
[ 'storage.modifier.others.logtalk',
[ 'meta.modifier.others.logtalk',
'punctuation.definition.storage.modifier.logtalk' ],
regex: ':-\\s(?:e(?:lse|ndif)|built_in|dynamic|synchronized|threaded)(?=[.])' },
{ caseInsensitive: false,
todo: 'fix grouping',
token:
[ 'storage.modifier.others.logtalk',
[ 'meta.modifier.others.logtalk',
'punctuation.definition.storage.modifier.logtalk' ],
regex: ':-\\s(?:c(?:alls|oinductive)|e(?:lif|n(?:coding|sure_loaded)|xport)|i(?:f|n(?:clude|itialization|fo))|reexport|set_(?:logtalk|prolog)_flag|uses)(?=[(])' },
{ caseInsensitive: false,
todo: 'fix grouping',
token:
[ 'storage.modifier.others.logtalk',
[ 'meta.modifier.others.logtalk',
'punctuation.definition.storage.modifier.logtalk' ],
regex: ':-\\s(?:alias|info|d(?:ynamic|iscontiguous)|m(?:eta_(?:non_terminal|predicate)|ode|ultifile)|p(?:ublic|r(?:otected|ivate))|op|use(?:s|_module)|synchronized)(?=[(])' },
{ token: 'keyword.operator.message-sending.logtalk',

0 comments on commit cc17ae1

Please sign in to comment.