Add support for untracked local snippets

This commit is contained in:
2026-08-27 12:24:00 +01:00
parent fc04774f4e
commit 3b26a1b421
3 changed files with 31 additions and 2 deletions

View File

@@ -1,3 +1,25 @@
-- Fold markdown sections through the blank lines that trail them. The upstream
-- query applies (#trim! @fold) to (section), which leaves the blank lines before
-- the next heading outside the fold and pads every collapsed section with an
-- empty line. Set explicitly rather than dropped in after/queries/, since only
-- the first folds.scm found on the runtimepath is used as the base query and the
-- one shipped with the parser wins that race.
vim.treesitter.query.set('markdown', 'folds', [[
([
(fenced_code_block)
(indented_code_block)
(list_item
(list))
] @fold
(#trim! @fold))
(section) @fold
(section
(list) @fold
(#trim! @fold))
]])
local has_tree_sitter_cli = vim.fn.executable('tree-sitter') == 1
if not has_tree_sitter_cli then