From 2e5b560482fb76342387e7183283efe9d431f114 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 22 Feb 2025 13:07:21 +0100 Subject: feat(treesitter): table of contents for checkhealth, markdown (#32282) Problem: It's difficult to navigate large structured text files (vim help, checkhealth, Markdown). Solution: Support `gO` for table of contents and `]]`/`[[` for moving between headings for all these filetypes using treesitter queries. Refactor: colorization of highlight groups is moved to the `help` ftplugin while headings-related functionality is implemented in a private `vim.treesitter` module for possible future use for other filetypes. --- runtime/lua/vim/treesitter/language.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/vim/treesitter/language.lua') diff --git a/runtime/lua/vim/treesitter/language.lua b/runtime/lua/vim/treesitter/language.lua index 16d19bfc5a..38d309a102 100644 --- a/runtime/lua/vim/treesitter/language.lua +++ b/runtime/lua/vim/treesitter/language.lua @@ -5,6 +5,7 @@ local M = {} ---@type table local ft_to_lang = { help = 'vimdoc', + checkhealth = 'vimdoc', } --- Returns the filetypes for which a parser named {lang} is used. -- cgit