mirror of
https://github.com/helix-editor/helix.git
synced 2024-10-26 19:27:50 +03:00
Add Graphviz Dot lang support (#3241)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
5ca98edfb1
commit
919edfb323
@ -13,6 +13,7 @@
|
|||||||
| dart | ✓ | | ✓ | `dart` |
|
| dart | ✓ | | ✓ | `dart` |
|
||||||
| devicetree | ✓ | | ✓ | |
|
| devicetree | ✓ | | ✓ | |
|
||||||
| dockerfile | ✓ | | | `docker-langserver` |
|
| dockerfile | ✓ | | | `docker-langserver` |
|
||||||
|
| dot | ✓ | | | `dot-language-server` |
|
||||||
| edoc | ✓ | | | |
|
| edoc | ✓ | | | |
|
||||||
| eex | ✓ | | | |
|
| eex | ✓ | | | |
|
||||||
| ejs | ✓ | | | |
|
| ejs | ✓ | | | |
|
||||||
|
@ -1570,3 +1570,17 @@ indent = { tab-width = 2, unit = " " }
|
|||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "ungrammar"
|
name = "ungrammar"
|
||||||
source = { git = "https://github.com/Philipp-M/tree-sitter-ungrammar", rev = "0113de880a58ea14f2a75802e9b99fcc25003d9c" }
|
source = { git = "https://github.com/Philipp-M/tree-sitter-ungrammar", rev = "0113de880a58ea14f2a75802e9b99fcc25003d9c" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "dot"
|
||||||
|
scope = "source.dot"
|
||||||
|
injection-regex = "dot"
|
||||||
|
file-types = ["dot"]
|
||||||
|
roots = []
|
||||||
|
comment-token = "//"
|
||||||
|
indent = { tab-width = 4, unit = " " }
|
||||||
|
language-server = { command = "dot-language-server", args = ["--stdio"] }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "dot"
|
||||||
|
source = { git = "https://github.com/rydesun/tree-sitter-dot", rev = "917230743aa10f45a408fea2ddb54bbbf5fbe7b7" }
|
||||||
|
43
runtime/queries/dot/highlights.scm
Normal file
43
runtime/queries/dot/highlights.scm
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
(keyword) @keyword
|
||||||
|
(string_literal) @string
|
||||||
|
(number_literal) @constant.numeric
|
||||||
|
|
||||||
|
[
|
||||||
|
(edgeop)
|
||||||
|
(operator)
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
";"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
(subgraph
|
||||||
|
id: (id
|
||||||
|
(identifier) @namespace)
|
||||||
|
)
|
||||||
|
|
||||||
|
(attribute
|
||||||
|
name: (id
|
||||||
|
(identifier) @type)
|
||||||
|
value: (id
|
||||||
|
(identifier) @constant)
|
||||||
|
)
|
||||||
|
|
||||||
|
[
|
||||||
|
(comment)
|
||||||
|
(preproc)
|
||||||
|
] @comment
|
||||||
|
|
||||||
|
(ERROR) @error
|
||||||
|
|
||||||
|
(identifier) @variable
|
2
runtime/queries/dot/injections.scm
Normal file
2
runtime/queries/dot/injections.scm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
((html_internal) @injection.content
|
||||||
|
(#set! injection.language "html"))
|
Loading…
Reference in New Issue
Block a user