Skip to content

Commit 204a2da

Browse files
committed
Add an elixir-specific markdown language
1 parent 59cfe95 commit 204a2da

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

languages.toml

+9
Original file line numberDiff line numberDiff line change
@@ -1998,3 +1998,12 @@ grammar = "qmljs"
19981998
[[grammar]]
19991999
name = "qmljs"
20002000
source = { git = "https://github.com/yuja/tree-sitter-qmljs", rev = "0b2b25bcaa7d4925d5f0dda16f6a99c588a437f1" }
2001+
2002+
[[language]]
2003+
name = "elixir-markdown"
2004+
scope = "text.markdown.elixir"
2005+
injection-regex = "exmd|elixir-markdown"
2006+
file-types = []
2007+
roots = []
2008+
indent = { tab-width = 2, unit = " " }
2009+
grammar = "markdown"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
; inherits: markdown
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
((indented_code_block) @injection.content
2+
(#match? @injection.content "^\\s*iex")
3+
(#set! injection.include-children)
4+
(#set! injection.language "iex"))
5+
6+
((indented_code_block) @injection.content
7+
(#set! injection.include-children)
8+
(#set! injection.language "elixir"))
9+
10+
; inherits: markdown

runtime/queries/elixir/injections.scm

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
(arguments [
1919
(string (quoted_content) @injection.content)
2020
(sigil (quoted_content) @injection.content)
21-
])) (#set! injection.language "markdown"))
21+
])) (#set! injection.language "elixir-markdown"))
2222

2323
; Zigler Sigils
2424
((sigil

0 commit comments

Comments
 (0)