Literate Haskell.sublime-syntax (1650B)
1 %YAML 1.2 2 --- 3 # http://www.sublimetext.com/docs/3/syntax.html 4 name: Literate Haskell 5 file_extensions: 6 - lhs 7 scope: text.tex.latex.haskell 8 contexts: 9 prototype: 10 - include: scope:text.tex.latex#comments 11 12 main: 13 - include: scope:text.tex.latex#unique-latex 14 - include: scope:text.tex.latex#packages 15 - include: haskell-code 16 - include: scope:text.tex.latex#plain-tex 17 - include: scope:text.tex.latex#begin-end-commands 18 - include: scope:text.tex.latex#general-commands 19 - include: global-braces 20 21 global-braces: 22 - match: '\{' 23 scope: punctuation.definition.group.brace.begin.latex 24 push: 25 - meta_scope: meta.group.brace.latex 26 - match: '\}' 27 scope: punctuation.definition.group.brace.end.latex 28 pop: true 29 - include: main 30 31 haskell-code: 32 - match: '(?:\s*)((\\)begin)(\{)(code)(\})' 33 captures: 34 1: support.function.be.latex 35 2: punctuation.definition.backslash.latex 36 3: punctuation.definition.group.brace.begin.latex 37 4: variable.parameter.function.latex 38 5: punctuation.definition.group.brace.end.latex 39 push: 40 - meta_scope: meta.function.embedded.haskell.latex 41 - meta_content_scope: source.haskell.embedded.latex 42 - match: '((\\)end)(\{)(code)(\})' 43 captures: 44 1: support.function.be.latex 45 2: punctuation.definition.backslash.latex 46 3: punctuation.definition.group.brace.begin.latex 47 4: variable.parameter.function.latex 48 5: punctuation.definition.group.brace.end.latex 49 pop: true 50 - include: scope:source.haskell