Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timotheecour/192fcbb8fda23b2012f8f420d88bf893 to your computer and use it in GitHub Desktop.
Save timotheecour/192fcbb8fda23b2012f8f420d88bf893 to your computer and use it in GitHub Desktop.
# Sub-Syntax selectors
- comment: C
name: source.c.embedded.nim
patterns:
- begin: \{\.(emit:)
end: \.\}
captures:
'1': {name: keyword.other.nim}
'2': {name: comment.syntax.nim}
endCaptures:
'1': {name: comment.syntax.nim}
patterns:
- name: keyword.operator.nim
begin: \`
end: \`
- {include: $self}
- comment: assembly
name: source.asm.embedded.nim
patterns:
- begin: (asm )(\"\"\")
end: \"\"\"
captures:
'1': {name: keyword.other.nim}
'2': {name: comment.syntax.nim}
endCaptures:
'0': {name: comment.syntax.nim}
patterns:
- name: keyword.operator.nim
begin: \`
end: \`
- {include: source.asm}
- comment: asmLang
name: source.asmLang.embedded.nim
patterns:
- begin: (asmLang\s*)(\"\"\")
end: \"\"\"
captures:
'1': {name: storage.type.function.nim}
'2': {name: comment.syntax.nim}
endCaptures:
'0': {name: comment.syntax.nim}
patterns:
- {include: source.asm}
- comment: jsLang
name: source.jsLang.embedded.nim
patterns:
- begin: (jsLang\s*)(\"\"\")
end: \"\"\"
captures:
'1': {name: storage.type.function.nim}
'2': {name: comment.syntax.nim}
endCaptures:
'0': {name: comment.syntax.nim}
patterns:
- {include: source.js}
- comment: cppLang
name: source.cppLang.embedded.nim
patterns:
- begin: (cppLang\s*)(\"\"\")
end: \"\"\"
captures:
'1': {name: storage.type.function.nim}
'2': {name: comment.syntax.nim}
endCaptures:
'0': {name: comment.syntax.nim}
patterns:
# - {include: source.cpp}
- {include: source.c++}
- comment: cLang
name: source.cLang.embedded.nim
patterns:
- begin: (cLang\s*)(\"\"\")
end: \"\"\"
captures:
'1': {name: storage.type.function.nim}
# '1': {name: keyword.other.nim}
'2': {name: comment.syntax.nim}
endCaptures:
'0': {name: comment.syntax.nim}
patterns:
- {include: source.c}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment