feat(languages): Support markdoc (#6432)
Add basic support for [markdoc](https://markdoc.dev/). For language server, see: https://github.com/markdoc-extra/markdoc-ls For tree sitter, see: https://github.com/markdoc-extra/tree-sitter-markdoc
This commit is contained in:
parent
fed5e6e646
commit
70de5026b8
4 changed files with 30 additions and 0 deletions
|
@ -81,6 +81,7 @@
|
||||||
| llvm-mir-yaml | ✓ | | ✓ | |
|
| llvm-mir-yaml | ✓ | | ✓ | |
|
||||||
| lua | ✓ | ✓ | ✓ | `lua-language-server` |
|
| lua | ✓ | ✓ | ✓ | `lua-language-server` |
|
||||||
| make | ✓ | | | |
|
| make | ✓ | | | |
|
||||||
|
| markdoc | ✓ | | | `markdoc-ls` |
|
||||||
| markdown | ✓ | | | `marksman` |
|
| markdown | ✓ | | | `marksman` |
|
||||||
| markdown.inline | ✓ | | | |
|
| markdown.inline | ✓ | | | |
|
||||||
| matlab | ✓ | | | |
|
| matlab | ✓ | | | |
|
||||||
|
|
|
@ -2461,3 +2461,14 @@ indent = { tab-width = 2, unit = " " }
|
||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "hurl"
|
name = "hurl"
|
||||||
source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "264c42064b61ee21abe88d0061f29a0523352e22" }
|
source = { git = "https://github.com/pfeiferj/tree-sitter-hurl", rev = "264c42064b61ee21abe88d0061f29a0523352e22" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "markdoc"
|
||||||
|
scope = "text.markdoc"
|
||||||
|
roots = []
|
||||||
|
file-types = ["mdoc"]
|
||||||
|
language-server = { command = "markdoc-ls", args = ["--stdio"] }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "markdoc"
|
||||||
|
source = { git = "https://github.com/markdoc-extra/tree-sitter-markdoc", rev = "5ffe71b29e8a3f94823913ea9cea51fcfa7e3bf8" }
|
||||||
|
|
16
runtime/queries/markdoc/highlights.scm
Normal file
16
runtime/queries/markdoc/highlights.scm
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
tag_name: (identifier) @tag
|
||||||
|
(tag_self_closing "/" @tag)
|
||||||
|
(tag_close "/" @tag)
|
||||||
|
([(tag_start) (tag_end) "="] @tag)
|
||||||
|
(attribute [key : (identifier)] @attribute)
|
||||||
|
(attribute [shorthand : (identifier)] @attribute)
|
||||||
|
(variable [variable : (identifier) (variable_sigil)] @variable)
|
||||||
|
(variable_tail property : (identifier) @variable.other.member)
|
||||||
|
(function function_name : (identifier) @function)
|
||||||
|
(function_parameter_named parameter : (identifier) @variable.parameter)
|
||||||
|
|
||||||
|
(hash_key key: (identifier) @variable.other.member)
|
||||||
|
(string) @string
|
||||||
|
(number) @constant.numeric
|
||||||
|
(boolean) @constant.builtin.boolean
|
||||||
|
(null) @constant.builtin
|
2
runtime/queries/markdoc/injections.scm
Normal file
2
runtime/queries/markdoc/injections.scm
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
((markdown) @injection.content
|
||||||
|
(#set! injection.language "markdown"))
|
Loading…
Reference in a new issue