2023-06-22 21:44:26 +02:00
|
|
|
/* eslint-disable node/no-extraneous-import */
|
|
|
|
import {HighlightStyle} from '@codemirror/language';
|
|
|
|
import {tags} from '@lezer/highlight';
|
2023-06-02 16:53:32 +02:00
|
|
|
|
2023-06-05 18:02:44 +02:00
|
|
|
const playgroundHighlightStyle = HighlightStyle.define([
|
|
|
|
{
|
|
|
|
tag: [tags.special(tags.variableName), tags.tagName],
|
2023-06-15 22:22:00 +02:00
|
|
|
color: 'var(--sl-color--code-base)',
|
2023-06-14 19:00:06 +02:00
|
|
|
},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.className,
|
2023-06-14 21:18:38 +02:00
|
|
|
color: 'var(--sl-color--code-cool)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontWeight: '600',
|
2023-06-14 21:18:38 +02:00
|
|
|
},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.comment,
|
2023-06-14 21:18:38 +02:00
|
|
|
color: 'var(--sl-color--code-muted)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontStyle: 'italic',
|
2023-06-14 21:18:38 +02:00
|
|
|
},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.keyword,
|
2023-06-14 19:00:06 +02:00
|
|
|
color: 'var(--sl-color--code-bright-dark)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontWeight: '600',
|
2023-06-14 19:00:06 +02:00
|
|
|
},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.controlKeyword,
|
2023-06-14 21:18:38 +02:00
|
|
|
color: 'var(--sl-color--code-dark)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontWeight: '600',
|
2023-06-14 21:18:38 +02:00
|
|
|
},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.definitionKeyword,
|
2023-06-14 19:00:06 +02:00
|
|
|
color: 'var(--sl-color--code-dark)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontWeight: '600',
|
2023-06-14 21:18:38 +02:00
|
|
|
},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.operator,
|
2023-06-14 21:18:38 +02:00
|
|
|
color: 'var(--sl-color--code-muted-dark)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontWeight: '600',
|
2023-06-14 19:00:06 +02:00
|
|
|
},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.propertyName,
|
2023-06-14 19:00:06 +02:00
|
|
|
color: 'var(--sl-color--code-warm)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontWeight: '600',
|
2023-06-14 21:18:38 +02:00
|
|
|
},
|
2023-06-22 21:44:26 +02:00
|
|
|
{tag: tags.punctuation, color: 'var(--sl-color--code-muted-dark)'},
|
|
|
|
{tag: tags.string, color: 'var(--sl-color--code-bright)'},
|
|
|
|
{tag: tags.unit, color: 'var(--sl-color--code-base)'},
|
|
|
|
{tag: tags.atom, color: 'var(--sl-color--code-base)'},
|
2023-06-15 22:22:00 +02:00
|
|
|
{
|
|
|
|
tag: tags.labelName,
|
2023-06-14 21:18:38 +02:00
|
|
|
color: 'var(--sl-color--code-dark)',
|
2023-06-15 22:22:00 +02:00
|
|
|
fontWeight: '600',
|
|
|
|
},
|
2023-06-05 18:02:44 +02:00
|
|
|
]);
|
2023-06-22 21:44:26 +02:00
|
|
|
export {playgroundHighlightStyle};
|