aboutsummaryrefslogtreecommitdiff
path: root/src/gen
diff options
context:
space:
mode:
Diffstat (limited to 'src/gen')
-rw-r--r--src/gen/gen_help_html.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gen/gen_help_html.lua b/src/gen/gen_help_html.lua
index d4766d84a1..0d98d9e1b1 100644
--- a/src/gen/gen_help_html.lua
+++ b/src/gen/gen_help_html.lua
@@ -778,6 +778,7 @@ local function parse_buf(fname, text, parser_path)
vim.treesitter.language.add('vimdoc', { path = parser_path })
end
local lang_tree = assert(vim.treesitter.get_parser(buf, nil, { error = false }))
+ lang_tree:parse()
return lang_tree, buf
end
@@ -1397,6 +1398,9 @@ function M.validate(help_dir, include, parser_path)
local files_to_errors = {} ---@type table<string, string[]>
ensure_runtimepath()
tagmap = get_helptags(vim.fs.normalize(help_dir))
+ --- XXX: Append tags from netrw, until we remove it...
+ local netrwtags = get_helptags(vim.fs.normalize('$VIMRUNTIME/pack/dist/opt/netrw/doc/'))
+ tagmap = vim.tbl_extend('keep', tagmap, netrwtags)
helpfiles = get_helpfiles(help_dir, include)
parser_path = parser_path and vim.fs.normalize(parser_path) or nil
@@ -1424,7 +1428,7 @@ function M.validate(help_dir, include, parser_path)
}
end
---- Validates vimdoc files on $VIMRUNTIME. and print human-readable error messages if fails.
+--- Validates vimdoc files in $VIMRUNTIME, and prints error messages on failure.
---
--- If this fails, try these steps (in order):
--- 1. Fix/cleanup the :help docs.
@@ -1464,7 +1468,7 @@ function M.test_gen(help_dir)
print('doc path = ' .. vim.uv.fs_realpath(help_dir))
-- Because gen() is slow (~30s), this test is limited to a few files.
- local input = { 'help.txt', 'index.txt', 'nvim.txt' }
+ local input = { 'api.txt', 'index.txt', 'nvim.txt' }
local rv = M.gen(help_dir, tmpdir, input)
eq(#input, #rv.helpfiles)
eq(0, rv.err_count, 'parse errors in :help docs')