From cc4017b8426f275232cb23648eca05a2477a8e4f Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 19 Jun 2024 00:23:00 -0500 Subject: [PATCH] fix(nvim): make headlines quote query work for nested lists in markdown --- .../nvim/lua/plugins/configs/headlines.lua | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/headlines.lua b/users/price/dots/.config/nvim/lua/plugins/configs/headlines.lua index e8f59031..6c4d9a5a 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/headlines.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/headlines.lua @@ -26,6 +26,29 @@ return { bullets = bullets, bullet_highlights = bullet_highlights, fat_headline_lower_string = "▀", + query = vim.treesitter.query.parse( + "markdown", + [[ + (atx_heading [ + (atx_h1_marker) + (atx_h2_marker) + (atx_h3_marker) + (atx_h4_marker) + (atx_h5_marker) + (atx_h6_marker) + ] @headline) + + (thematic_break) @dash + + (fenced_code_block) @codeblock + + (block_quote_marker) @quote + (block_quote (paragraph (inline (block_continuation) @quote))) + (block_quote (paragraph (block_continuation) @quote)) + (block_quote (list (list_item (paragraph (inline (block_continuation) @quote))))) + (block_quote (block_continuation) @quote) + ]] + ), }, rmd = { bullets = bullets,