Skip to content

Instantly share code, notes, and snippets.

@gdotdesign
Last active March 9, 2024 17:56
Show Gist options
  • Save gdotdesign/34521520627b82428913df2fe09cb0a3 to your computer and use it in GitHub Desktop.
Save gdotdesign/34521520627b82428913df2fe09cb0a3 to your computer and use it in GitHub Desktop.
%YAML 1.2
---
name: Mint
file_extensions:
- mint
scope: source.mint
variables:
variable: '[a-z][A-Za-z_0-9]*'
contexts:
main:
- include: comments
- match: '\b[A-Z]\w*(\.[A-Z]\w*)*\b'
scope: constant.other
- match: \b(global|state|encode|decode|for|module|provider|suite|test|parallel|sequence|case|try|catch|next|with|component|property|fun|routes|get|connect|exposing|record|store|use|when|if|else|where)\b
scope: keyword.control
- match: \{|\}
scope: meta.brackets
- match: '"'
push: string
- match: \bstyle\b
scope: keyword.control
set:
- match: '{{variable}}'
scope: entity.name.function
- match: (?=\{)
set: css_body
comments:
- match: /\*\*(?!/)
scope: punctuation.definition.comment.begin.js
push:
- meta_include_prototype: false
- meta_scope: comment.block.documentation.js
- match: \*/
scope: punctuation.definition.comment.end.js
pop: true
- match: /\*
scope: punctuation.definition.comment.begin.js
push:
- meta_include_prototype: false
- meta_scope: comment.block.js
- match: \*/
scope: punctuation.definition.comment.end.js
pop: true
css_body:
- match: '(\b[A-Za-z_0-9-]+):'
captures:
1: meta.selector.css
- match: '\{(.*)\}'
- match: '\}'
pop: true
string:
- meta_scope: string.quoted.double.c
- match: \\.
scope: constant.character.escape.c
- match: '"'
pop: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment