mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 10:56:19 +04:00
Added yuck language support (for eww) (#6064)
This commit is contained in:
parent
44729fbaf9
commit
b89b2eaf68
@ -147,4 +147,5 @@
|
|||||||
| xit | ✓ | | | |
|
| xit | ✓ | | | |
|
||||||
| xml | ✓ | | ✓ | |
|
| xml | ✓ | | ✓ | |
|
||||||
| yaml | ✓ | | ✓ | `yaml-language-server` |
|
| yaml | ✓ | | ✓ | `yaml-language-server` |
|
||||||
|
| yuck | ✓ | | | |
|
||||||
| zig | ✓ | ✓ | ✓ | `zls` |
|
| zig | ✓ | ✓ | ✓ | `zls` |
|
||||||
|
@ -2180,3 +2180,16 @@ comment-token = "("
|
|||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "uxntal"
|
name = "uxntal"
|
||||||
source = { git = "https://github.com/Jummit/tree-sitter-uxntal", rev = "9297e95ef74380b0ad84c4fd98f91e9f6e4319e6" }
|
source = { git = "https://github.com/Jummit/tree-sitter-uxntal", rev = "9297e95ef74380b0ad84c4fd98f91e9f6e4319e6" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "yuck"
|
||||||
|
scope = "source.yuck"
|
||||||
|
injection-regex = "yuck"
|
||||||
|
file-types = ["yuck"]
|
||||||
|
roots = []
|
||||||
|
comment-token = ";"
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "yuck"
|
||||||
|
source = { git = "https://github.com/Philipp-M/tree-sitter-yuck", rev = "9e97da5773f82123a8c8cccf8f7e795d140ed7d1" }
|
||||||
|
66
runtime/queries/yuck/highlights.scm
Normal file
66
runtime/queries/yuck/highlights.scm
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
(ERROR) @error
|
||||||
|
|
||||||
|
(line_comment) @comment
|
||||||
|
|
||||||
|
; keywords and symbols
|
||||||
|
|
||||||
|
(keyword) @keyword
|
||||||
|
(symbol) @tag
|
||||||
|
|
||||||
|
; literals
|
||||||
|
|
||||||
|
(bool_literal) @constant.builtin.boolean
|
||||||
|
(num_literal) @constant.numeric
|
||||||
|
|
||||||
|
; strings
|
||||||
|
(string_interpolation
|
||||||
|
(string_interpolation_start) @punctuation.special
|
||||||
|
(string_interpolation_end) @punctuation.special)
|
||||||
|
|
||||||
|
(escape_sequence) @constant.character.escape
|
||||||
|
|
||||||
|
(string
|
||||||
|
[
|
||||||
|
(unescaped_single_quote_string_fragment)
|
||||||
|
(unescaped_double_quote_string_fragment)
|
||||||
|
(unescaped_backtick_string_fragment)
|
||||||
|
"\""
|
||||||
|
"'"
|
||||||
|
"`"
|
||||||
|
]) @string
|
||||||
|
|
||||||
|
; operators and general punctuation
|
||||||
|
|
||||||
|
(unary_expression
|
||||||
|
operator: _ @operator)
|
||||||
|
|
||||||
|
(binary_expression
|
||||||
|
operator: _ @operator)
|
||||||
|
|
||||||
|
(ternary_expression
|
||||||
|
operator: _ @operator)
|
||||||
|
|
||||||
|
[
|
||||||
|
":"
|
||||||
|
"."
|
||||||
|
","
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
|
[
|
||||||
|
":"
|
||||||
|
"."
|
||||||
|
","
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
; Rest (general identifiers that are not yet catched)
|
||||||
|
|
||||||
|
(index) @variable
|
||||||
|
(ident) @variable
|
2
runtime/queries/yuck/injections.scm
Normal file
2
runtime/queries/yuck/injections.scm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
((line_comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
Loading…
Reference in New Issue
Block a user