mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 02:46:17 +04:00
Compare commits
6 Commits
bfff464881
...
b04150358d
Author | SHA1 | Date | |
---|---|---|---|
|
b04150358d | ||
|
f305c7299d | ||
|
9e0d2d0a19 | ||
|
46a6b8cfe7 | ||
|
707147362b | ||
|
ee9677687d |
@ -3,6 +3,7 @@
|
|||||||
| ada | ✓ | ✓ | | `ada_language_server` |
|
| ada | ✓ | ✓ | | `ada_language_server` |
|
||||||
| adl | ✓ | ✓ | ✓ | |
|
| adl | ✓ | ✓ | ✓ | |
|
||||||
| agda | ✓ | | | |
|
| agda | ✓ | | | |
|
||||||
|
| amber | ✓ | | | |
|
||||||
| astro | ✓ | | | |
|
| astro | ✓ | | | |
|
||||||
| awk | ✓ | ✓ | | `awk-language-server` |
|
| awk | ✓ | ✓ | | `awk-language-server` |
|
||||||
| bash | ✓ | ✓ | ✓ | `bash-language-server` |
|
| bash | ✓ | ✓ | ✓ | `bash-language-server` |
|
||||||
|
@ -3931,3 +3931,14 @@ indent = { tab-width = 4, unit = " " }
|
|||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "spade"
|
name = "spade"
|
||||||
source = { git = "https://gitlab.com/spade-lang/tree-sitter-spade/", rev = "4d5b141017c61fe7e168e0a5c5721ee62b0d9572" }
|
source = { git = "https://gitlab.com/spade-lang/tree-sitter-spade/", rev = "4d5b141017c61fe7e168e0a5c5721ee62b0d9572" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "amber"
|
||||||
|
scope = "source.ab"
|
||||||
|
file-types = ["ab"]
|
||||||
|
comment-token = "//"
|
||||||
|
indent = { tab-width = 4, unit = " " }
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "amber"
|
||||||
|
source = { git = "https://github.com/amber-lang/tree-sitter-amber", rev = "c6df3ec2ec243ed76550c525e7ac3d9a10c6c814" }
|
||||||
|
60
runtime/queries/amber/highlights.scm
Normal file
60
runtime/queries/amber/highlights.scm
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
"if"
|
||||||
|
"loop"
|
||||||
|
"for"
|
||||||
|
"return"
|
||||||
|
"fun"
|
||||||
|
"else"
|
||||||
|
"then"
|
||||||
|
"break"
|
||||||
|
"continue"
|
||||||
|
"and"
|
||||||
|
"or"
|
||||||
|
"not"
|
||||||
|
"let"
|
||||||
|
"pub"
|
||||||
|
"main"
|
||||||
|
"echo"
|
||||||
|
"exit"
|
||||||
|
"fun"
|
||||||
|
"import"
|
||||||
|
"from"
|
||||||
|
"as"
|
||||||
|
"in"
|
||||||
|
"fail"
|
||||||
|
"failed"
|
||||||
|
"silent"
|
||||||
|
"nameof"
|
||||||
|
"is"
|
||||||
|
"unsafe"
|
||||||
|
"trust"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
; Literals
|
||||||
|
(boolean) @constant.builtin.boolean
|
||||||
|
(number) @constant.numeric
|
||||||
|
(null) @constant.numeric
|
||||||
|
(string) @string
|
||||||
|
(status) @keyword
|
||||||
|
(command) @string
|
||||||
|
(handler) @keyword
|
||||||
|
(block) @punctuation.delimiter
|
||||||
|
(variable_init) @keyword
|
||||||
|
(variable_assignment) @punctuation.delimiter
|
||||||
|
(variable) @variable
|
||||||
|
(escape_sequence) @constant.character.escape
|
||||||
|
(type_name_symbol) @type
|
||||||
|
(interpolation) @punctuation.delimiter
|
||||||
|
(reference) @keyword
|
||||||
|
(preprocessor_directive) @comment
|
||||||
|
(shebang) @comment
|
||||||
|
(function_definition
|
||||||
|
name: (variable) @function.method)
|
||||||
|
(function_call
|
||||||
|
name: (variable) @function.method)
|
||||||
|
(import_statement
|
||||||
|
"pub" @keyword
|
||||||
|
"import" @keyword
|
||||||
|
"from" @keyword)
|
@ -111,6 +111,9 @@
|
|||||||
|
|
||||||
(integer) @constant.numeric.integer
|
(integer) @constant.numeric.integer
|
||||||
(float) @constant.numeric.float
|
(float) @constant.numeric.float
|
||||||
|
(expression_statement (string) @content
|
||||||
|
(#match? @content "^\"\"\"")
|
||||||
|
) @comment.block.documentation
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
(string) @string
|
(string) @string
|
||||||
(escape_sequence) @constant.character.escape
|
(escape_sequence) @constant.character.escape
|
||||||
|
@ -30,6 +30,8 @@
|
|||||||
(string_literal)
|
(string_literal)
|
||||||
(raw_string_literal)
|
(raw_string_literal)
|
||||||
] @string
|
] @string
|
||||||
|
(line_comment (doc_comment)) @comment.documentation
|
||||||
|
(block_comment (doc_comment)) @comment.block.documentation
|
||||||
[
|
[
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
(unicode_string_literal)
|
(unicode_string_literal)
|
||||||
(yul_string_literal)
|
(yul_string_literal)
|
||||||
] @string
|
] @string
|
||||||
|
(hex_string_literal "hex" @string.special.symbol)
|
||||||
|
(unicode_string_literal "unicode" @string.special.symbol)
|
||||||
[
|
[
|
||||||
(number_literal)
|
(number_literal)
|
||||||
(yul_decimal_number)
|
(yul_decimal_number)
|
||||||
@ -20,6 +22,7 @@
|
|||||||
[
|
[
|
||||||
(true)
|
(true)
|
||||||
(false)
|
(false)
|
||||||
|
(yul_boolean)
|
||||||
] @constant.builtin.boolean
|
] @constant.builtin.boolean
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
@ -44,18 +47,18 @@
|
|||||||
(type_name "(" @punctuation.bracket "=>" @punctuation.delimiter ")" @punctuation.bracket)
|
(type_name "(" @punctuation.bracket "=>" @punctuation.delimiter ")" @punctuation.bracket)
|
||||||
|
|
||||||
; Definitions
|
; Definitions
|
||||||
(struct_declaration
|
(struct_declaration
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
(enum_declaration
|
(enum_declaration
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
(contract_declaration
|
(contract_declaration
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
(library_declaration
|
(library_declaration
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
(interface_declaration
|
(interface_declaration
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
(event_definition
|
(event_definition
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
|
|
||||||
(function_definition
|
(function_definition
|
||||||
name: (identifier) @function)
|
name: (identifier) @function)
|
||||||
|
Loading…
Reference in New Issue
Block a user