2023-06-05 18:02:44 +02:00
|
|
|
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-14 19:00:06 +02:00
|
|
|
color: 'var(--sl-color--code-base)'
|
|
|
|
},
|
|
|
|
{ tag: tags.keyword,
|
|
|
|
color: 'var(--sl-color--code-bright-dark)',
|
|
|
|
fontWeight: '600'
|
|
|
|
},
|
|
|
|
{ tag: tags.definitionKeyword,
|
|
|
|
color: 'var(--sl-color--code-dark)',
|
|
|
|
fontWeight: '600'
|
|
|
|
},
|
|
|
|
{ tag: tags.comment,
|
|
|
|
color: 'var(--sl-color--code-muted)',
|
|
|
|
fontStyle: 'italic'
|
|
|
|
},
|
|
|
|
{ tag: tags.propertyName,
|
|
|
|
color: 'var(--sl-color--code-warm)',
|
|
|
|
fontWeight: '600'
|
|
|
|
},
|
|
|
|
{ tag: tags.className,
|
|
|
|
color: 'var(--sl-color--code-cool)',
|
|
|
|
fontWeight: '600'
|
2023-06-05 18:02:44 +02:00
|
|
|
},
|
|
|
|
]);
|
|
|
|
|
2023-06-13 18:42:28 +02:00
|
|
|
export { playgroundHighlightStyle };
|