Add support for untracked local snippets
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user