Skip to content

Commit

Permalink
YAML: update queries
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd committed Apr 18, 2021
1 parent 15f27cf commit 34eec5c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lockfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"revision": "91fe2754796cd8fba5f229505a23fa08f3546c06"
},
"yaml": {
"revision": "2240ccd0538c8f41394b9cd2202a175b1660b8d6"
"revision": "6129a83eeec7d6070b1c0567ec7ce3509ead607c"
},
"zig": {
"revision": "05d6f44e5ae8fe986a7ca09ce2a301aa5148a20f"
Expand Down
3 changes: 2 additions & 1 deletion lua/nvim-treesitter/parsers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@ list.yaml = {
install_info = {
url = "https://github.com/ikatyang/tree-sitter-yaml",
files = { "src/parser.c", "src/scanner.cc" },
}
},
maintainers = {"@stsewd"},
}

list.nix = {
Expand Down
8 changes: 6 additions & 2 deletions queries/yaml/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
(integer_scalar) @number
(float_scalar) @number
(comment) @comment
(anchor) @type
(alias) @type
(anchor_name) @type
(alias_name) @type
(tag) @type
(yaml_directive) @keyword
(ERROR) @error

[
","
"-"
Expand All @@ -21,9 +22,12 @@
"?"
"|"
] @punctuation.delimiter

[
"["
"]"
"{"
"}"
] @punctuation.bracket

["*" "&"] @punctuation.special
4 changes: 2 additions & 2 deletions queries/yaml/locals.scm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(document) @scope

(anchor) @definition
(alias) @reference
(anchor_name) @definition
(alias_name) @reference

0 comments on commit 34eec5c

Please sign in to comment.