mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
feat: Add ADL language support (#10029)
* feat: Add ADL language support * removed error match & change captures to match https://docs.helix-editor.com/master/themes.html\#syntax-highlighting * fixes to grammar, highlight changes based on PR and grammar fixes
This commit is contained in:
parent
e663dafcd8
commit
0da809c981
@ -1,6 +1,7 @@
|
|||||||
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
| Language | Syntax Highlighting | Treesitter Textobjects | Auto Indent | Default LSP |
|
||||||
| --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- |
|
||||||
| ada | ✓ | ✓ | | `ada_language_server`, `ada_language_server` |
|
| ada | ✓ | ✓ | | `ada_language_server`, `ada_language_server` |
|
||||||
|
| adl | ✓ | ✓ | ✓ | |
|
||||||
| agda | ✓ | | | |
|
| agda | ✓ | | | |
|
||||||
| astro | ✓ | | | |
|
| astro | ✓ | | | |
|
||||||
| awk | ✓ | ✓ | | `awk-language-server` |
|
| awk | ✓ | ✓ | | `awk-language-server` |
|
||||||
|
@ -3479,3 +3479,21 @@ language-servers = ["earthlyls"]
|
|||||||
[[grammar]]
|
[[grammar]]
|
||||||
name = "earthfile"
|
name = "earthfile"
|
||||||
source = { git = "https://github.com/glehmann/tree-sitter-earthfile", rev = "2a6ab191f5f962562e495a818aa4e7f45f8a556a" }
|
source = { git = "https://github.com/glehmann/tree-sitter-earthfile", rev = "2a6ab191f5f962562e495a818aa4e7f45f8a556a" }
|
||||||
|
|
||||||
|
[[language]]
|
||||||
|
name = "adl"
|
||||||
|
scope = "source.adl"
|
||||||
|
injection-regex = "adl"
|
||||||
|
file-types = ["adl"]
|
||||||
|
roots = []
|
||||||
|
comment-token = "//"
|
||||||
|
indent = { tab-width = 2, unit = " " }
|
||||||
|
|
||||||
|
[language.auto-pairs]
|
||||||
|
'"' = '"'
|
||||||
|
'{' = '}'
|
||||||
|
'<' = '>'
|
||||||
|
|
||||||
|
[[grammar]]
|
||||||
|
name = "adl"
|
||||||
|
source = { git = "https://github.com/adl-lang/tree-sitter-adl", rev = "2787d04beadfbe154d3f2da6e98dc45a1b134bbf" }
|
||||||
|
37
runtime/queries/adl/highlights.scm
Normal file
37
runtime/queries/adl/highlights.scm
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
; adl
|
||||||
|
|
||||||
|
[
|
||||||
|
"module"
|
||||||
|
"struct"
|
||||||
|
"union"
|
||||||
|
"type"
|
||||||
|
"newtype"
|
||||||
|
"annotation"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
(adl (scoped_name)) @namespace
|
||||||
|
(comment) @comment
|
||||||
|
(doc_comment) @comment.block.documentation
|
||||||
|
(name) @type
|
||||||
|
|
||||||
|
(fname) @variable.other.member
|
||||||
|
|
||||||
|
(type_expr (scoped_name) @type)
|
||||||
|
|
||||||
|
(type_expr_params (param (scoped_name) @type.parameter))
|
||||||
|
|
||||||
|
; json
|
||||||
|
(key) @string.special
|
||||||
|
|
||||||
|
(string) @string
|
||||||
|
|
||||||
|
(number) @constant.numeric
|
||||||
|
|
||||||
|
[
|
||||||
|
(null)
|
||||||
|
(true)
|
||||||
|
(false)
|
||||||
|
] @constant.builtin
|
||||||
|
|
||||||
|
(escape_sequence) @constant.character.escape
|
||||||
|
|
12
runtime/queries/adl/indents.scm
Normal file
12
runtime/queries/adl/indents.scm
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
(struct)
|
||||||
|
(union)
|
||||||
|
|
||||||
|
(array)
|
||||||
|
(object)
|
||||||
|
] @indent
|
||||||
|
|
||||||
|
; [
|
||||||
|
; "}"
|
||||||
|
; "]"
|
||||||
|
; ] @outdent
|
1
runtime/queries/adl/textobjects.scm
Normal file
1
runtime/queries/adl/textobjects.scm
Normal file
@ -0,0 +1 @@
|
|||||||
|
(struct (_) @function.inside) @funtion.around
|
Loading…
Reference in New Issue
Block a user