ada(highlights,folds,locals): update to parser changes

This commit is contained in:
Emmanuel Briot 2023-02-14 11:26:04 +01:00 committed by Christian Clason
parent ad9ae9e7de
commit 4db6696672
4 changed files with 7 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{ {
"ada": { "ada": {
"revision": "e9e2ec9d3b6302e9b455901bec00036e29d1c121" "revision": "42cc2eb141529b03a91c18ec8646a0a58fb111ba"
}, },
"agda": { "agda": {
"revision": "80ea622cf952a0059e168e5c92a798b2f1925652" "revision": "80ea622cf952a0059e168e5c92a798b2f1925652"

View file

@ -2,7 +2,8 @@
;; za toggles folding a package, subprogram, if statement or loop ;; za toggles folding a package, subprogram, if statement or loop
[ [
(package_specification) (package_declaration)
(generic_package_declaration)
(package_body) (package_body)
(subprogram_body) (subprogram_body)
(block_statement) (block_statement)

View file

@ -105,9 +105,10 @@
;; Highlight the name of subprograms ;; Highlight the name of subprograms
(procedure_specification name: (_) @function) (procedure_specification name: (_) @function)
(function_specification name: (_) @function) (function_specification name: (_) @function)
(package_specification name: (_) @function) (package_declaration name: (_) @function)
(package_body name: (_) @function) (package_body name: (_) @function)
(generic_instantiation name: (_) @function) (generic_instantiation name: (_) @function)
(entry_declaration . (identifier) @function)
;; Some keywords should take different categories depending on the context ;; Some keywords should take different categories depending on the context
(use_clause "use" @include "type" @include) (use_clause "use" @include "type" @include)

View file

@ -3,7 +3,7 @@
;; See https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables ;; See https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables
(compilation) @scope (compilation) @scope
(package_specification) @scope (package_declaration) @scope
(package_body) @scope (package_body) @scope
(subprogram_declaration) @scope (subprogram_declaration) @scope
(subprogram_body) @scope (subprogram_body) @scope
@ -12,7 +12,7 @@
(with_clause (identifier) @definition.import) (with_clause (identifier) @definition.import)
(procedure_specification name: (_) @definition.function) (procedure_specification name: (_) @definition.function)
(function_specification name: (_) @definition.function) (function_specification name: (_) @definition.function)
(package_specification name: (_) @definition.var) (package_declaration name: (_) @definition.var)
(package_body name: (_) @definition.var) (package_body name: (_) @definition.var)
(generic_instantiation . name: (_) @definition.var) (generic_instantiation . name: (_) @definition.var)
(component_declaration . (identifier) @definition.var) (component_declaration . (identifier) @definition.var)