mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-27 03:43:29 +04:00
Improve language support for Ada (#12131)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
80709cee61
commit
95e6c11ebc
@ -78,6 +78,7 @@
|
||||
| gomod | ✓ | | | `gopls` |
|
||||
| gotmpl | ✓ | | | `gopls` |
|
||||
| gowork | ✓ | | | `gopls` |
|
||||
| gpr | ✓ | | | `ada_language_server` |
|
||||
| graphql | ✓ | ✓ | | `graphql-lsp` |
|
||||
| groovy | ✓ | | | |
|
||||
| gts | ✓ | ✓ | ✓ | `typescript-language-server`, `vscode-eslint-language-server`, `ember-language-server` |
|
||||
|
@ -2540,11 +2540,11 @@ source = { git = "https://github.com/sourcegraph/tree-sitter-jsonnet", rev = "04
|
||||
name = "ada"
|
||||
scope = "source.ada"
|
||||
injection-regex = "ada"
|
||||
file-types = ["adb", "ads", "gpr"]
|
||||
file-types = ["adb", "ads"]
|
||||
roots = ["alire.toml"]
|
||||
comment-token = "--"
|
||||
indent = { tab-width = 3, unit = " " }
|
||||
language-servers = ["ada-language-server", "ada-gpr-language-server"]
|
||||
language-servers = ["ada-language-server"]
|
||||
|
||||
|
||||
[[grammar]]
|
||||
@ -3942,3 +3942,17 @@ indent = { tab-width = 4, unit = " " }
|
||||
[[grammar]]
|
||||
name = "amber"
|
||||
source = { git = "https://github.com/amber-lang/tree-sitter-amber", rev = "c6df3ec2ec243ed76550c525e7ac3d9a10c6c814" }
|
||||
|
||||
[[language]]
|
||||
name = "gpr"
|
||||
scope = "source.gpr"
|
||||
injection-regex = "gpr"
|
||||
file-types = ["gpr"]
|
||||
roots = ["alire.toml"]
|
||||
comment-token = "--"
|
||||
indent = { tab-width = 3, unit = " " }
|
||||
language-servers = ["ada-gpr-language-server"]
|
||||
|
||||
[[grammar]]
|
||||
name = "gpr"
|
||||
source = { git = "https://github.com/brownts/tree-sitter-gpr", rev = "cea857d3c18d1385d1f5b66cd09ea1e44173945c" }
|
||||
|
51
runtime/queries/gpr/highlights.scm
Normal file
51
runtime/queries/gpr/highlights.scm
Normal file
@ -0,0 +1,51 @@
|
||||
[ "abstract" "all" "at"
|
||||
"case"
|
||||
"end" "extends" "external" "external_as_list"
|
||||
"for"
|
||||
"is"
|
||||
"limited"
|
||||
"null"
|
||||
"others"
|
||||
"package"
|
||||
;; "project"
|
||||
"renames"
|
||||
"type"
|
||||
"use"
|
||||
"when"
|
||||
"with"
|
||||
] @keyword
|
||||
|
||||
;; Avoid highlighting Project in Project'Project_Dir
|
||||
(project_declaration "project" @keyword)
|
||||
|
||||
;; highlight qualifiers as keywords (not all qualifiers are actual keywords)
|
||||
(project_qualifier _ @keyword)
|
||||
|
||||
[":=" "&" "|" "=>"] @operator
|
||||
|
||||
(comment) @comment
|
||||
(string_literal) @string
|
||||
(numeric_literal) @constant.numeric
|
||||
|
||||
;; Type
|
||||
(typed_string_declaration name: (identifier) @type)
|
||||
(variable_declaration type: (name (identifier) @type .))
|
||||
|
||||
;; Variable
|
||||
(variable_declaration name: (identifier) @variable)
|
||||
(variable_reference (name (identifier) @variable .) .)
|
||||
|
||||
;; Function
|
||||
(builtin_function_call name: _ @function.builtin)
|
||||
|
||||
;; Attribute
|
||||
(attribute_declaration name: (identifier) @attribute)
|
||||
(attribute_reference (identifier) @attribute)
|
||||
|
||||
;; Package
|
||||
(variable_reference (name (identifier) @function .) "'")
|
||||
(package_declaration
|
||||
[ name: (identifier) @function
|
||||
endname: (identifier) @function
|
||||
origname: (name (identifier) @function .)
|
||||
basename: (name (identifier) @function .)])
|
Loading…
Reference in New Issue
Block a user