Skip to content

Commit

Permalink
Fix CodeMirror highlight for directives and use a theme that supports…
Browse files Browse the repository at this point in the history
… variables
  • Loading branch information
pmoura committed Dec 5, 2018
1 parent d2085e9 commit cc17ae1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions coding/codemirror/index.html
Expand Up @@ -5,7 +5,7 @@
<link rel=stylesheet href="../../doc/docs.css"> <link rel=stylesheet href="../../doc/docs.css">


<link rel="stylesheet" href="../../lib/codemirror.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="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script> <script src="../../addon/edit/matchbrackets.js"></script>
<script src="logtalk.js"></script> <script src="logtalk.js"></script>
Expand Down Expand Up @@ -475,7 +475,7 @@ <h2>Logtalk mode</h2>
lineNumbers: true, lineNumbers: true,
matchBrackets: true, matchBrackets: true,
extraKeys: {"Tab": "indentAuto"}, extraKeys: {"Tab": "indentAuto"},
theme: "twilight" theme: "ambiance"
}); });
</script> </script>


Expand Down
12 changes: 6 additions & 6 deletions coding/codemirror/logtalk.js
Expand Up @@ -488,33 +488,33 @@ CodeMirror.defineMode("logtalk", function(cmCfg, modeCfg) {
regex: '%.*$\\n?' }, regex: '%.*$\\n?' },
{ todo: 'fix grouping', { todo: 'fix grouping',
token: token:
[ 'storage.type.opening.logtalk', [ 'meta.type.opening.logtalk',
'punctuation.definition.storage.type.logtalk' ], 'punctuation.definition.storage.type.logtalk' ],
regex: ':-\\s(?:object|protocol|category|module)(?=[(])' }, regex: ':-\\s(?:object|protocol|category|module)(?=[(])' },
{ todo: 'fix grouping', { todo: 'fix grouping',
token: token:
[ 'storage.type.closing.logtalk', [ 'meta.type.closing.logtalk',
'punctuation.definition.storage.type.logtalk' ], 'punctuation.definition.storage.type.logtalk' ],
regex: ':-\\send_(?:object|protocol|category)(?=[.])' }, regex: ':-\\send_(?:object|protocol|category)(?=[.])' },
{ caseInsensitive: false, { caseInsensitive: false,
token: 'storage.type.relations.logtalk', token: 'meta.type.relations.logtalk',
regex: '\\b(?:complements|extends|i(?:nstantiates|mp(?:orts|lements))|specializes)(?=[(])' }, regex: '\\b(?:complements|extends|i(?:nstantiates|mp(?:orts|lements))|specializes)(?=[(])' },
{ caseInsensitive: false, { caseInsensitive: false,
todo: 'fix grouping', todo: 'fix grouping',
token: token:
[ 'storage.modifier.others.logtalk', [ 'meta.modifier.others.logtalk',
'punctuation.definition.storage.modifier.logtalk' ], 'punctuation.definition.storage.modifier.logtalk' ],
regex: ':-\\s(?:e(?:lse|ndif)|built_in|dynamic|synchronized|threaded)(?=[.])' }, regex: ':-\\s(?:e(?:lse|ndif)|built_in|dynamic|synchronized|threaded)(?=[.])' },
{ caseInsensitive: false, { caseInsensitive: false,
todo: 'fix grouping', todo: 'fix grouping',
token: token:
[ 'storage.modifier.others.logtalk', [ 'meta.modifier.others.logtalk',
'punctuation.definition.storage.modifier.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)(?=[(])' }, 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, { caseInsensitive: false,
todo: 'fix grouping', todo: 'fix grouping',
token: token:
[ 'storage.modifier.others.logtalk', [ 'meta.modifier.others.logtalk',
'punctuation.definition.storage.modifier.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)(?=[(])' }, 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', { token: 'keyword.operator.message-sending.logtalk',
Expand Down

0 comments on commit cc17ae1

Please sign in to comment.