-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gen_help_html.lua): adapt to new parser #20352
Conversation
3fb2736
to
d9d1547
Compare
- Separate blocks (paragraphs) of content by a blank line(s). | ||
- Do not use indentation in random places—that prevents the page from using | ||
"flow" layout. If you need a preformatted section, put it in | ||
a |help-codeblock| starting with ">". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some doc guidelines for optimal formatting.
|
||
|
||
- `ext_cmdline` Externalize the cmdline. |ui-cmdline| | ||
- `ext_hlstate` Detailed highlight state. |ui-hlstate| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use lists to list things... otherwise we are stuck with "hardwrap" / preformatted format.
exec_lua('return vim.inspect(...)', rv.invalid_tags)) | ||
-- TODO: Fix all parse errors in :help files. | ||
ok(rv.err_count < 1300, '<1300 parse errors', rv.err_count) | ||
eq({}, rv.invalid_links, exec_lua([[return 'found invalid :help tag links:\n'..vim.inspect(...)]], rv.invalid_links)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid links are now at zero, so we can be strict here
ok(exec_lua('return vim.tbl_count(...)', rv.invalid_tags) < 538, '<538', | ||
exec_lua('return vim.inspect(...)', rv.invalid_tags)) | ||
-- TODO: Fix all parse errors in :help files. | ||
ok(rv.err_count < 1300, '<1300 parse errors', rv.err_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parse errors reduced from 24k to ~1k
NeoVim = 'Nvim', | ||
neovim = 'Nvim', | ||
lua = 'Lua', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
experimenting with other lint stuff here (TODO: obviously scripts/gen_help_html.lua
is not really the place for "linting", will eventually revisit this)
83f7ed4
to
5ebb282
Compare
- adapt to parser changes from neovim/tree-sitter-vimdoc#16 - numerous other generator improvements
XDG_STATE_HOME='$XDG_CONFIG_HOME', | ||
XDG_DATA_DIRS='$XDG_CONFIG_DIRS', | ||
clear({ | ||
args_rm={'runtimepath'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and in startup_spec.lua
, remove the set runtimepath^=./build/lib/nvim/
added in this PR (which is necessary to find parsers not installed on the system).
Problem: The HTML :help docs generated by the new `gen_help_html.lua` do not mention the source commit-id in the footer. Solution: Since neovim/neovim#20352 the script now accepts a commit-id, so pass it.
Problem: The HTML :help docs generated by the new `gen_help_html.lua` do not mention the source commit-id in the footer. Solution: Since neovim/neovim#20352 the script now accepts a commit-id, so pass it.
ref #11967