mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
add fidl support (#9713)
This commit is contained in:
parent
1a82aeeae9
commit
358ac6bc1f
@ -44,6 +44,7 @@
|
|||||||
| erb | ✓ | | | |
|
| erb | ✓ | | | |
|
||||||
| erlang | ✓ | ✓ | | `erlang_ls` |
|
| erlang | ✓ | ✓ | | `erlang_ls` |
|
||||||
| esdl | ✓ | | | |
|
| esdl | ✓ | | | |
|
||||||
|
| fidl | ✓ | | | |
|
||||||
| fish | ✓ | ✓ | ✓ | |
|
| fish | ✓ | ✓ | ✓ | |
|
||||||
| forth | ✓ | | | `forth-lsp` |
|
| forth | ✓ | | | `forth-lsp` |
|
||||||
| fortran | ✓ | | ✓ | `fortls` |
|
| fortran | ✓ | | ✓ | `fortls` |
|
||||||
|
@ -3140,3 +3140,21 @@ indent = { tab-width = 2, unit = " " }
|
|||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "groovy"
|
name = "groovy"
|
||||||
source = { git = "https://github.com/Decodetalkers/tree-sitter-groovy", rev = "7e023227f46fee428b16a0288eeb0f65ee2523ec" }
|
source = { git = "https://github.com/Decodetalkers/tree-sitter-groovy", rev = "7e023227f46fee428b16a0288eeb0f65ee2523ec" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "fidl"
|
||||||
|
scope = "source.fidl"
|
||||||
|
injection-regex = "fidl"
|
||||||
|
file-types = ["fidl"]
|
||||||
|
comment-token = "//"
|
||||||
|
indent = { tab-width = 4, unit = " " }
|
||||||
|
|
||||||
|
[language.auto-pairs]
|
||||||
|
'"' = '"'
|
||||||
|
'{' = '}'
|
||||||
|
'(' = ')'
|
||||||
|
'<' = '>'
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "fidl"
|
||||||
|
source = { git = "https://github.com/google/tree-sitter-fidl", rev = "bdbb635a7f5035e424f6173f2f11b9cd79703f8d" }
|
||||||
|
6
runtime/queries/fidl/folds.scm
Normal file
6
runtime/queries/fidl/folds.scm
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[
|
||||||
|
(layout_declaration)
|
||||||
|
(protocol_declaration)
|
||||||
|
(resource_declaration)
|
||||||
|
(service_declaration)
|
||||||
|
] @fold
|
64
runtime/queries/fidl/highlights.scm
Normal file
64
runtime/queries/fidl/highlights.scm
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
[
|
||||||
|
"ajar"
|
||||||
|
"alias"
|
||||||
|
"as"
|
||||||
|
"bits"
|
||||||
|
"closed"
|
||||||
|
"compose"
|
||||||
|
"const"
|
||||||
|
"enum"
|
||||||
|
"error"
|
||||||
|
"flexible"
|
||||||
|
"library"
|
||||||
|
"open"
|
||||||
|
; "optional" we did not specify a node for optional yet
|
||||||
|
"overlay"
|
||||||
|
"protocol"
|
||||||
|
"reserved"
|
||||||
|
"resource"
|
||||||
|
"service"
|
||||||
|
"strict"
|
||||||
|
"struct"
|
||||||
|
"table"
|
||||||
|
"type"
|
||||||
|
"union"
|
||||||
|
"using"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
(primitives_type) @type.builtin
|
||||||
|
|
||||||
|
(builtin_complex_type) @type.builtin
|
||||||
|
|
||||||
|
(const_declaration
|
||||||
|
(identifier) @constant)
|
||||||
|
|
||||||
|
[
|
||||||
|
"="
|
||||||
|
"|"
|
||||||
|
"&"
|
||||||
|
"->"
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
(attribute
|
||||||
|
"@" @attribute
|
||||||
|
(identifier) @attribute)
|
||||||
|
|
||||||
|
(string_literal) @string
|
||||||
|
|
||||||
|
(numeric_literal) @constant.numeric
|
||||||
|
|
||||||
|
[
|
||||||
|
(true)
|
||||||
|
(false)
|
||||||
|
] @constant.builtin.boolean
|
||||||
|
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
2
runtime/queries/fidl/injections.scm
Normal file
2
runtime/queries/fidl/injections.scm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
Loading…
Reference in New Issue
Block a user