aboutsummaryrefslogtreecommitdiffstats
path: root/queries/phpdoc
diff options
context:
space:
mode:
authorPham Huy Hoang <hoangtun0810@gmail.com>2024-01-06 15:05:50 +0900
committerChristian Clason <c.clason@uni-graz.at>2024-01-19 16:58:37 +0100
commit57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9 (patch)
tree70bf645539882b88e6fa129cefd30986b89bbac3 /queries/phpdoc
parentci: add query lint job (diff)
downloadnvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.gz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.bz2
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.lz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.xz
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.tar.zst
nvim-treesitter-57a8acf0c4ed5e7f6dda83c3f9b073f8a99a70f9.zip
chore: query formatting
Diffstat (limited to 'queries/phpdoc')
-rw-r--r--queries/phpdoc/highlights.scm54
1 files changed, 36 insertions, 18 deletions
diff --git a/queries/phpdoc/highlights.scm b/queries/phpdoc/highlights.scm
index a30409314..076a7d528 100644
--- a/queries/phpdoc/highlights.scm
+++ b/queries/phpdoc/highlights.scm
@@ -1,22 +1,28 @@
(tag_name) @attribute @nospell
+
(tag
- (tag_name) @_tag (#eq? @_tag "@param")
- (variable_name) @variable.parameter
-)
+ (tag_name) @_tag
+ (#eq? @_tag "@param")
+ (variable_name) @variable.parameter)
+
(tag
- (tag_name) @_tag (#eq? @_tag "@property")
- (variable_name) @property
-)
+ (tag_name) @_tag
+ (#eq? @_tag "@property")
+ (variable_name) @property)
+
(tag
- (tag_name) @_tag (#eq? @_tag "@var")
- (variable_name) @variable
-)
+ (tag_name) @_tag
+ (#eq? @_tag "@var")
+ (variable_name) @variable)
+
(tag
- (tag_name) @_tag (#eq? @_tag "@function.method")
- (name) @function.method
-)
+ (tag_name) @_tag
+ (#eq? @_tag "@function.method")
+ (name) @function.method)
+
(parameter
(variable_name) @variable.parameter)
+
(type_list
[
(array_type)
@@ -24,24 +30,36 @@
(named_type)
(optional_type)
] @type)
+
(type_list) @nospell
+
(variable_name) @nospell
+
(tag
- (description (text) @none @spell))
+ (description
+ (text) @none @spell))
+
(tag
[
(author_name)
(version)
] @none)
+
(tag
- (email_address) @string.special.url
-)
+ (email_address) @string.special.url)
+
+(type_list
+ "|" @keyword)
+
+(variable_name
+ "$" @keyword)
-(type_list "|" @keyword)
-(variable_name "$" @keyword)
(tag
(tag_name) @_tag_name
- ["<" ">"] @keyword
+ [
+ "<"
+ ">"
+ ] @keyword
(#eq? @_tag_name "@author"))
(text) @spell