From 987dff6713af618ca2be8a2542d4a65f2ab42510 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 17 Mar 2024 13:13:12 +0100 Subject: [PATCH] feat(treesitter): update Vimdoc parser and queries to v2.4.0 --- cmake.deps/deps.txt | 4 +- runtime/queries/vimdoc/highlights.scm | 48 +++++++++---------- test/functional/treesitter/highlight_spec.lua | 6 +-- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/cmake.deps/deps.txt b/cmake.deps/deps.txt index b56ba3c1c8..17d989e700 100644 --- a/cmake.deps/deps.txt +++ b/cmake.deps/deps.txt @@ -47,8 +47,8 @@ TREESITTER_LUA_URL https://github.com/tree-sitter-grammars/tree-sitter-lua/archi TREESITTER_LUA_SHA256 230cfcbfa74ed1f7b8149e9a1f34c2efc4c589a71fe0f5dc8560622f8020d722 TREESITTER_VIM_URL https://github.com/neovim/tree-sitter-vim/archive/v0.4.0.tar.gz TREESITTER_VIM_SHA256 9f856f8b4a10ab43348550fa2d3cb2846ae3d8e60f45887200549c051c66f9d5 -TREESITTER_VIMDOC_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v2.2.0.tar.gz -TREESITTER_VIMDOC_SHA256 2cd898245d28bb606b05c022f04077031381d998faa3c6825c5ca01b7c89e2ae +TREESITTER_VIMDOC_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v2.5.0.tar.gz +TREESITTER_VIMDOC_SHA256 bb296ab877bc09b31d6fd3705165e23378e419dc391ca5c8d1b74d18b5335edc TREESITTER_QUERY_URL https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v0.1.0.tar.gz TREESITTER_QUERY_SHA256 e2b806f80e8bf1c4f4e5a96248393fe6622fc1fc6189d6896d269658f67f914c TREESITTER_PYTHON_URL https://github.com/tree-sitter/tree-sitter-python/archive/v0.20.4.tar.gz diff --git a/runtime/queries/vimdoc/highlights.scm b/runtime/queries/vimdoc/highlights.scm index 0c10b3c0b3..70a3a2f206 100644 --- a/runtime/queries/vimdoc/highlights.scm +++ b/runtime/queries/vimdoc/highlights.scm @@ -7,48 +7,46 @@ (column_heading) @markup.heading.4 (column_heading - "~" @markup.heading.4.marker + "~" @markup.heading.4 (#set! conceal "")) (tag - "*" @markup.heading.5.marker - . - text: (_) @label - . - "*" @markup.heading.5.marker - (#set! @markup.heading.5.marker conceal "")) + "*" @label + (#set! conceal "")) + +(tag + text: (_) @label) (taglink - "|" @markup.link.delimiter - . - text: (_) @markup.link - . - "|" @markup.link.delimiter - (#set! @markup.link.delimiter conceal "")) + "|" @markup.link + (#set! conceal "")) + +(taglink + text: (_) @markup.link) (optionlink text: (_) @markup.link) (codespan - "`" @markup.raw.delimiter - . - text: (_) @markup.raw - . - "`" @markup.raw.delimiter - (#set! @markup.raw.delimiter conceal "")) + "`" @markup.raw + (#set! conceal "")) + +(codespan + text: (_) @markup.raw) ((codeblock) @markup.raw.block (#set! "priority" 90)) (codeblock - [ - ">" - (language) - ] @markup.raw.delimiter + ">" @markup.raw + (#set! conceal "")) + +(codeblock + (language) @label (#set! conceal "")) (block - "<" @markup.raw.delimiter + "<" @markup.raw (#set! conceal "")) (argument) @variable.parameter @@ -57,6 +55,8 @@ (url) @string.special.url +(modeline) @keyword.directive + ((note) @comment.note (#any-of? @comment.note "Note:" "NOTE:" "Notes:")) diff --git a/test/functional/treesitter/highlight_spec.lua b/test/functional/treesitter/highlight_spec.lua index 297a7e6fb0..5d61524791 100644 --- a/test/functional/treesitter/highlight_spec.lua +++ b/test/functional/treesitter/highlight_spec.lua @@ -863,7 +863,7 @@ describe('treesitter highlighting (help)', function() screen:expect { grid = [[ - {1:>ruby} | + {1:>}{3:ruby} | {1: -- comment} | {1: local this_is = 'actually_lua'} | {1:<} | @@ -876,7 +876,7 @@ describe('treesitter highlighting (help)', function() screen:expect { grid = [[ - {1:>lua} | + {1:>}{3:lua} | {1: -- comment} | {1: }{3:local}{1: }{4:this_is}{1: }{3:=}{1: }{5:'actually_lua'} | {1:<} | @@ -889,7 +889,7 @@ describe('treesitter highlighting (help)', function() screen:expect { grid = [[ - {1:>ruby} | + {1:>}{3:ruby} | {1: -- comment} | {1: local this_is = 'actually_lua'} | {1:<} |