add gemtext.sublime-syntax

This commit is contained in:
lee2sman 2022-05-03 00:03:51 -04:00
parent dedb02ee27
commit 05ec6e923e
1 changed files with 33 additions and 0 deletions

33
gemtext.sublime-syntax Normal file
View File

@ -0,0 +1,33 @@
# by lettuce 2022, cc0
# gemini://gemini.ctrl-c.club/~lettuce
# syntax info: http://www.sublimetext.com/docs/3/syntax.html
name: Gemtext
file_extensions: [gmi]
scope: source.txt
contexts:
main:
# Line starting with #*
- match: '^\#.*'
push:
- meta_scope: meta.separator
- match: '$\n?'
pop: true
# Line starting with *
- match: '^\*.*'
push:
- meta_scope: meta.separator
- match: '$\n?'
pop: true
# Line starting with =>
- match: '^\=\>.*'
push:
- meta_scope: meta.separator
- match: '$\n?'
pop: true
# Line starting with a number
- match: '^[1-9_]+\b.*'
push:
- meta_scope: markup.heading
- match: '$\n?'
pop: true