Update syntax highlighting for perl

pull/647/head^2
Wilfred Hughes 2024-03-04 08:36:05 +07:00
parent d71f14ca8a
commit 05b9e6dc55
2 changed files with 8 additions and 42 deletions

@ -1,5 +1,9 @@
;; Copied from nvim-treesitter, under Apache License.
;; https://github.com/nvim-treesitter/nvim-treesitter/blob/909b5d26fddad5043e354046571e7c7353b53b61/queries/perl/highlights.scm
;;
;; Some items have been removed as upstream tree-sitter-perl has
;; removed some of the node names. The upstream commit is
;; https://github.com/ganezdragon/tree-sitter-perl/commit/a882a928d4930716896039d1c10e91b6d7444c48
; Misc keywords
[
@ -53,15 +57,6 @@
(hash_variable)
] @variable
; Special builtin variables
[
(special_scalar_variable)
(special_array_variable)
(special_hash_variable)
(special_literal)
(super)
] @variable.builtin
; Integer numbers
[
(integer)
@ -107,13 +102,6 @@
(function_definition
name: (identifier) @function)
[
(function)
(map)
(grep)
(bless)
] @function
[
"("
")"
@ -139,10 +127,8 @@
(array_dereference)
(hash_dereference)
(to_reference)
(type_glob)
(hash_access_variable)
(ternary_expression)
(ternary_expression_in_hash)
] @operator
[
@ -151,9 +137,6 @@
(regex_option_for_transliteration)
] @parameter
(type_glob
(identifier) @variable)
[
(word_list_qw)
(command_qx_quoted)

@ -1,5 +1,9 @@
;; Copied from nvim-treesitter, under Apache License.
;; https://github.com/nvim-treesitter/nvim-treesitter/blob/909b5d26fddad5043e354046571e7c7353b53b61/queries/perl/highlights.scm
;;
;; Some items have been removed as upstream tree-sitter-perl has
;; removed some of the node names. The upstream commit is
;; https://github.com/ganezdragon/tree-sitter-perl/commit/a882a928d4930716896039d1c10e91b6d7444c48
; Misc keywords
[
@ -53,15 +57,6 @@
(hash_variable)
] @variable
; Special builtin variables
[
(special_scalar_variable)
(special_array_variable)
(special_hash_variable)
(special_literal)
(super)
] @variable.builtin
; Integer numbers
[
(integer)
@ -107,13 +102,6 @@
(function_definition
name: (identifier) @function)
[
(function)
(map)
(grep)
(bless)
] @function
[
"("
")"
@ -139,10 +127,8 @@
(array_dereference)
(hash_dereference)
(to_reference)
(type_glob)
(hash_access_variable)
(ternary_expression)
(ternary_expression_in_hash)
] @operator
[
@ -151,9 +137,6 @@
(regex_option_for_transliteration)
] @parameter
(type_glob
(identifier) @variable)
[
(word_list_qw)
(command_qx_quoted)