diff options
| author | Santos Gallegos <stsewd@protonmail.com> | 2021-04-18 16:51:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-18 21:51:03 +0000 |
| commit | 574bd5ae37a5b460d99d10b0c315fbb3246bdc10 (patch) | |
| tree | befc644a91830e646bedfc00fde21714cdd2335a | |
| parent | Fix identifier type check (diff) | |
| download | nvim-treesitter-574bd5ae37a5b460d99d10b0c315fbb3246bdc10.tar nvim-treesitter-574bd5ae37a5b460d99d10b0c315fbb3246bdc10.tar.gz nvim-treesitter-574bd5ae37a5b460d99d10b0c315fbb3246bdc10.tar.bz2 nvim-treesitter-574bd5ae37a5b460d99d10b0c315fbb3246bdc10.tar.lz nvim-treesitter-574bd5ae37a5b460d99d10b0c315fbb3246bdc10.tar.xz nvim-treesitter-574bd5ae37a5b460d99d10b0c315fbb3246bdc10.tar.zst nvim-treesitter-574bd5ae37a5b460d99d10b0c315fbb3246bdc10.zip | |
YAML: update queries (#1203)
Closes https://github.com/nvim-treesitter/nvim-treesitter-refactor/issues/18
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 3 | ||||
| -rw-r--r-- | queries/yaml/highlights.scm | 8 | ||||
| -rw-r--r-- | queries/yaml/locals.scm | 4 |
5 files changed, 13 insertions, 8 deletions
@@ -147,7 +147,7 @@ We are looking for maintainers to add more parsers and to write query files for - [ ] [elm](https://github.com/elm-tooling/tree-sitter-elm) - [x] [erlang](https://github.com/AbstractMachinesLab/tree-sitter-erlang) (maintained by @ostera) - [x] [fennel](https://github.com/travonted/tree-sitter-fennel) (maintained by @TravonteD) -- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by not @tjdevries) +- [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by @Shatur95) - [x] [Glimmer and Ember](https://github.com/alexlafroscia/tree-sitter-glimmer) (maintained by @alexlafroscia) - [x] [go](https://github.com/tree-sitter/tree-sitter-go) (maintained by @theHamsta, @WinWisely268) - [x] [graphql](https://github.com/bkegley/tree-sitter-graphql) (maintained by @bkegley) @@ -189,7 +189,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [typescript](https://github.com/tree-sitter/tree-sitter-typescript) (maintained by @steelsojka) - [x] [verilog](https://github.com/tree-sitter/tree-sitter-verilog) (maintained by @zegervdv) - [x] [vue](https://github.com/ikatyang/tree-sitter-vue) (maintained by @WhyNotHugo) -- [ ] [yaml](https://github.com/ikatyang/tree-sitter-yaml) +- [x] [yaml](https://github.com/ikatyang/tree-sitter-yaml) (maintained by @stsewd) - [x] [zig](https://github.com/Himujjal/tree-sitter-zig) (maintained by @Himujjal) <!--parserinfo--> diff --git a/lockfile.json b/lockfile.json index d66d3f73e..729aa66bc 100644 --- a/lockfile.json +++ b/lockfile.json @@ -168,7 +168,7 @@ "revision": "91fe2754796cd8fba5f229505a23fa08f3546c06" }, "yaml": { - "revision": "2240ccd0538c8f41394b9cd2202a175b1660b8d6" + "revision": "6129a83eeec7d6070b1c0567ec7ce3509ead607c" }, "zig": { "revision": "05d6f44e5ae8fe986a7ca09ce2a301aa5148a20f" diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 4cd99a11f..e3dfeb5c0 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -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 = { diff --git a/queries/yaml/highlights.scm b/queries/yaml/highlights.scm index 1517e9134..818352bb7 100644 --- a/queries/yaml/highlights.scm +++ b/queries/yaml/highlights.scm @@ -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 + [ "," "-" @@ -21,9 +22,12 @@ "?" "|" ] @punctuation.delimiter + [ "[" "]" "{" "}" ] @punctuation.bracket + +["*" "&"] @punctuation.special diff --git a/queries/yaml/locals.scm b/queries/yaml/locals.scm index 6a74fb473..be91b5ca7 100644 --- a/queries/yaml/locals.scm +++ b/queries/yaml/locals.scm @@ -1,4 +1,4 @@ (document) @scope -(anchor) @definition -(alias) @reference +(anchor_name) @definition +(alias_name) @reference |
