on master help sign in
Improve Edoc highlighting within Erlang
452f7d0Michael Davis
languages.toml+2−2
@@ -1184,7 +1184,7 @@ language-server = { command = "erlang_ls" }
1184
1184
1185[[grammar]]
1185[[grammar]]
1186name = "erlang"
1186name = "erlang"
1187−source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "0e7d677d11a7379686c53c616825714ccb728059" }
1187+source = { git = "https://github.com/the-mikedavis/tree-sitter-erlang", rev = "ce0ed253d72c199ab93caba7542b6f62075339c4" }
1188
1188
1189[[language]]
1189[[language]]
1190name = "kotlin"
1190name = "kotlin"
@@ -1574,7 +1574,7 @@ indent = { tab-width = 4, unit = " " }
1574
1574
1575[[grammar]]
1575[[grammar]]
1576name = "edoc"
1576name = "edoc"
1577−source = { git = "https://github.com/the-mikedavis/tree-sitter-edoc", rev = "1691ec0aa7ad1ed9fa295590545f27e570d12d60" }
1577+source = { git = "https://github.com/the-mikedavis/tree-sitter-edoc", rev = "74774af7b45dd9cefbf9510328fc6ff2374afc50" }
1578
1578
1579[[language]]
1579[[language]]
1580name = "jsdoc"
1580name = "jsdoc"
runtime/queries/edoc/highlights.scm+2
@@ -48,3 +48,5 @@
48 (language_identifier)
48 (language_identifier)
49 (quote_content)
49 (quote_content)
50] @markup.raw.block
50] @markup.raw.block
51+
52+(parameter) @variable.parameter
runtime/queries/edoc/injections.scm+2−2
@@ -16,5 +16,5 @@
16 (tag) @_tag
16 (tag) @_tag
17 (argument) @injection.content)
17 (argument) @injection.content)
18 (#eq? @_tag "@type")
18 (#eq? @_tag "@type")
19− (#set injection.language "erlang")
19+ (#set! injection.language "erlang")
20− (#set injection.include-children))
20+ (#set! injection.include-children))
runtime/queries/erlang/highlights.scm+6−4
@@ -94,10 +94,6 @@
94(unary_operator operator: _ @operator)
94(unary_operator operator: _ @operator)
95["/" ":" "->"] @operator
95["/" ":" "->"] @operator
96
96
97−(tripledot) @comment.discard
98−
99−(comment) @comment
100−
101; Macros
97; Macros
102(macro
98(macro
103 "?"+ @constant
99 "?"+ @constant
@@ -112,8 +108,14 @@
112((variable) @comment.discard
108((variable) @comment.discard
113 (#match? @comment.discard "^_"))
109 (#match? @comment.discard "^_"))
114
110
111+(tripledot) @comment.discard
112+
113+[(comment) (line_comment) (shebang)] @comment
114+
115; Basic types
115; Basic types
116(variable) @variable
116(variable) @variable
117+((atom) @constant.builtin.boolean
118+ (#match? @constant.builtin.boolean "^(true|false)$"))
117(atom) @string.special.symbol
119(atom) @string.special.symbol
118(string) @string
120(string) @string
119(character) @constant.character
121(character) @constant.character
runtime/queries/erlang/injections.scm+7−2
@@ -1,2 +1,7 @@
1−((comment_content) @injection.content
1+((line_comment (comment_content) @injection.content)
2− (#set! injection.language "edoc"))
2+ (#set! injection.language "edoc")
3+ (#set! injection.include-children)
4+ (#set! injection.combined))
5+
6+((comment (comment_content) @injection.content)
7+ (#set! injection.language "comment"))