aboutsummaryrefslogtreecommitdiff
path: root/src/gen/gen_help_html.lua
Commit message (Collapse)AuthorAge
* docs(help): specify h4 "function signature" format #42434masterJustin M. Keyes2 days
| | | | | | | | | | | | | | | | | | | | | Work towards enabling ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88) in all `:help` files. Problem: The final boss of vimdoc pseudo-structure: Vim's quasi-headings on function signatures and excmd docs is visually distinctive but too inconsistent for a nice parse rule. Solution: - Define the quasi-heading format as an "h4" variant, specified at `:help help-tag-heading`. - For simplicity and predictability, it is defined as any line that ends with a help tag(s) preceded by 2 or more spaces (or 1 tab). - Update existing docs. - This one-time update has a lot of changes, but is very unlikely to conflict with ported Vim-patches because (1) Vim rarely adds new *excmds* that we want, and (2) *function* docs are auto-generated. ref https://github.com/neovim/tree-sitter-vimdoc/issues/110
* docs: flow layoutJustin M. Keyes3 days
| | | | | | | | | | Work towards enabling "flow" layout in most `:help` files. Since [tables are supported in help](https://github.com/neovim/tree-sitter-vimdoc#tables), it's now possible to render most help files as ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88) instead of the legacy fixed-width layout. Besides [improved HTML rendering](https://github.com/neovim/neovim/pull/42381#discussion_r4285705739), flow layout will allow `:help` presentation-mode to un-hardwrap text blocks.
* docs: cleanup tables, highlights.scm #42381Justin M. Keyes3 days
| | | highlights.scm: `#match` is slow, prefer `#lua-match`.
* feat(docs): generate PDFJustin M. Keyes4 days
| | | | | Generate PDF using `chrome`. TODO: we probably don't need the `typst` codepath.
* feat(docs): table renderingJustin M. Keyes4 days
| | | | | | Render tables in both `:help` and generated HTML. Use NBSP (nonbreaking space) char in empty table cells.
* fix(docs): listitems with codeblocks #42367Justin M. Keyes4 days
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - `<` before a listitem (`< - foo`) is not concealed. - Codeblock HTML has extra blank lines. - Codeblock in a listitem ends the listitem, so HTML docs drop the rest of the item and its nesting. Example from `:h nvim_open_win()`: ``` • border: … the double-box style can be specified as: > [ "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" ]. < If fewer than eight chars are given, they will be repeated. • bufpos: … tree-sitter-vimdoc v4.1.0: (block (line_li (prefix) (line) (codeblock (code (line))))) (block (line) ; "If fewer…" (line_li (prefix) (line) (line))) ; "bufpos" tree-sitter-vimdoc v4.2.0: (block (line_li (prefix) (line) (codeblock (code (line))) (line)) ; "If fewer…" (line_li (prefix) (line) (line))) ; "bufpos" ``` Solution: - Bump tree-sitter-vimdoc to v4.2.0. https://github.com/neovim/tree-sitter-vimdoc/pull/174 - gen_help_html: get listitem indent from its first line - gen_help_html: don't double codeblock newlines. - highlight query: conceal `<` in `line_li`. - docs: fix doc sources where a blank line was missing after listitems followed by non-listitem text.
* fix(gen_help_html): cleanup #41525Justin M. Keyes2026-08-28
|
* docs(gen_help_html): generate Typst format #40665Kevin2026-08-28
| | | | | | | | Problem: gen_help_html.lua only outputs HTML, but Typst is useful for producing PDFs. Solution: Add gen_one_typ() and ts_node_to_typ(), which mirror the existing gen_one_html() and ts_node_to_html().
* fix(docs): multi-level list dedent indentation #40850Maria Solano2026-07-20
| | | | | | | | | | | | | | Problem: The list-item indentation logic in `gen_help_html.lua` tracks `opt.indent` that only decrements by one level when a list item is less indented than its sibling. Dedenting across multiple nesting levels at once produces the wrong left margin. Solution: Track the exact leading whitespace for each indent level in a `opt.indent_ws` stack: - On reset or a top-level item initialize the stack with the current item's whitespace. - When indenting deeper push the current whitespace at the new level. - When dedenting pop every level whose tracked whitespace is deeper than the current item (reaching the correct ancestor level).
* refactor(docs): extract HTML-specific bits from gen_help_html #39946Kevin2026-06-02
| | | | | | | | | | | | | | Problem: We'd like to export a PDF version of the user manual (https://github.com/neovim/neovim.github.io/issues/477), but `gen_help_html.lua` assumes an HTML output in several places. Solution: - Make gen() take an output param - Rename gen_one() -> gen_one_html() - Rename visit_node() -> ts_node_to_html() - Add a mapping to gen() that calls the correct gen_one*() function. This prepares the addition of new methods for Typst output.
* revert: "vim-patch:9.2.0405: when jumping to tags, will open URLs (#39461)" ↵zeertzjq2026-04-28
| | | | | | | (#39487) This reverts commit 72bc6c5801867e8f99a87737a64c1713ceac1e01. Fix #39480
* vim-patch:9.2.0405: when jumping to tags, will open URLs (#39461)zeertzjq2026-04-28
| | | | | | | | | | | | | Problem: when jumping to tags, will open URLs (Srinivas Piskala Ganesh Babu) Solution: Disallow trying to open remote files. closes: vim/vim#20068 Supported by AI https://github.com/vim/vim/commit/ae196b2d589562fbb3fcd64cd0cc33f052c6cf56 Co-authored-by: Christian Brabandt <cb@256bit.org>
* docs: job-control.txt => flow layout #38463Yochem van Rosmalen2026-03-24
|
* docs: change lua-bit to new layout #38447Yochem van Rosmalen2026-03-23
| | | | | | | | | | Problem: Flow layout looks better on neovim.io. Nvim-owned help files should switch to the new layout. Also lua-bit.txt doesn't use the same format for function documentation as the other docs (such as api.txt). Solution: Switch to new layout. Tweak the function documentation to be in line with the other docs style.
* test: ignore kuwasha.net url #38438Yochem van Rosmalen2026-03-23
| | | | | | | | Problem: Flagged by `make lintdocurls` on GitHub actions. Doesn't reproduce locally, so probably blocks the action runner. Solution: Ignore it.
* docs: starting.txt new layoutJustin M. Keyes2026-03-22
|
* fix(docs): improve adjacent list itemsJustin M. Keyes2026-03-22
| | | | | | | | | | | | | | Problem: List items separated by blank lines are wrapped in "blocks", then the html generator does not treat them as contiguous list-items, and the browser shows the list as "1. 1. 1." instead of "1. 2. 3.". Solution: - When generating a list-item, check if the last child of the previous block was a list-item, and merge them together. - Massage the help source. fix #37220
* docs: miscJustin M. Keyes2026-03-20
|
* docs: terminal.txt new layoutJustin M. Keyes2026-03-18
|
* refactor(treesitter)!: get_parser return nil on error #37276nikolightsaber2026-03-13
|
* Merge #38117 from noib3/fix-lua-lints-in-srcJustin M. Keyes2026-03-09
|\
| * fix: resolve all remaining LuaLS warnings in `src/`Riccardo Mazzarini2026-03-09
| |
* | fix(gen): alias /doc/user/helptag.html to /doc/user/helptag/ #38156Yochem van Rosmalen2026-03-06
|/ | | | | | | | | | | | Problem: helptag.html is used to search for the online help documentation of a specified tag. The previous URL was `/doc/user/helptag.html` but that switched to `/doc/user/helptag/` in https://github.com/neovim/neovim.github.io/pull/437. The alias of the .html page was added to all other doc pages but forgotten for the helptag.html page Solution: Add the alias to the helptag.html page too
* revert :gen_help_html.lua commit 4a4de73 #38100Yochem van Rosmalen2026-02-28
| | | revert commit 4a4de73043060a4c0f8e91bc69ff62c69fcd8702
* fix(help): better align local-additions #38097Yochem van Rosmalen2026-02-27
| | | | | | | | | | | | | | | | | | | | | | | Problem: Descriptions of plugins often contain taglinks which are generally concealed. This misaligns them by 2 characters with descriptions that don't have a taglink in them. Solution: Don't count "bar" characters (`|`) for the description width. Example: Actual buffer content: ``` myplugin.txt |lsp| is cool myplugin.txt this is a nice plugin ``` Rendered as: ``` myplugin.txt lsp is cool myplugin.txt this is a nice plugin ```
* refactor(gen): let Hugo build html docs #37972Yochem van Rosmalen2026-02-23
| | | | | | | | | | | | | | Problem: The html and css of the website's documentation pages are defined in long strings in gen_help_html.lua, making it hard to maintain and improve them. E.g. adding in headers that state the documentation is for nightly Nvim has been a long standing feature request. Solution: Move the inlined css and html (e.g. the <head>, <nav>, etc.) to Hugo. Now that the website is build with Hugo, we can use its templating system to generate the full html/css from the Tree-sitter tree: https://github.com/neovim/neovim.github.io/pull/437
* ci(lintdocurls): ignore websites that block GHA #36982Yochem van Rosmalen2025-12-15
| | | | | | | Problem: These URLs seem to be unreachable from GHA CI but are available locally. Solution: Ignore them for now.
* feat(docs): numbered listitemsJustin M. Keyes2025-12-15
|
* fix(gen_help_html): parser overrideJustin M. Keyes2025-12-15
| | | | | | Call `vim.treesitter.language.add()` before `get_helptags` (which triggers filetype=help). And do this in the main routine, instead of each gen/validate task.
* docs: miscJustin M. Keyes2025-12-06
| | | | | | fix https://github.com/neovim/neovim.github.io/issues/419 Co-authored-by: Rob Pilling <robpilling@gmail.com>
* ci: check URL reachability #35593Yochem van Rosmalen2025-11-18
| | | | | | | | | | | | | | Problem: scripts/check_urls.vim manually matches urls in the help pages and then synchronously checks them via curl/wget/powershell. This is extremely slow (~5 minutes for Nvims runtime on my machine) and prone to errors in how the urls are matched. Solution: - Use Tree-sitter to find the urls in the help pages and `vim.net.request` to check the responses. - Add a `lintdocurls` build task and check it in CI (every Friday). - Reopens a dedicated issue if it finds unreachable URLs. - Drop the old check_urls.vim script.
* docs: rework main help pageJustin M. Keyes2025-11-16
|
* docs: new layoutJustin M. Keyes2025-10-27
|
* fix(docs): dev.txt is "new layout"Justin M. Keyes2025-10-27
|
* fix(build): gen_help_html fails #36359Justin M. Keyes2025-10-27
| | | | | | | | | | | | | | | | | | | | | Problem: fe4faaf81a6f3 added an invalid "redirect" item, which caused the assert() to fail, which then caused the neovim/doc/ CI to fail: https://github.com/neovim/doc/actions/runs/18830779387/job/53721736276 : The previous commit e69beb9b1aba tried to fix a different issue, which has gone hidden because the "invalid tags" failure has been present on the neovim/doc/ but was silently failing. invalid tags: { ["g:netrw_keepdir"] = "usr_22.txt", netrw = "vi_diff.txt", ... plugins = "editorconfig" } Solution: - Fix the invalid redirect. - Improve the redirects assertion.
* fix(build): invalid help tags cause reports to fail #36356Justin M. Keyes2025-10-27
| | | | | | | | | | | | | | | | | | Problem: The doc/ repo CI is failing https://github.com/neovim/doc/actions/runs/18830779387/job/53721736276 : invalid tags: { ["g:netrw_keepdir"] = "usr_22.txt", netrw = "vi_diff.txt", ["netrw-P"] = "usr_22.txt", ... ["netrw-v"] = "usr_22.txt", plugins = "editorconfig" } Solution: Add the "generate netrw tags" hack to the `gen()` step. Previously it was only in the `validate()` step. (idk why it only started failing 3 days ago...)
* docs: dev-quickstart, dev-test #36304Justin M. Keyes2025-10-24
|
* docs: dev_tools, dev_archJustin M. Keyes2025-10-24
|
* docs: json, tests, lsp #35754Justin M. Keyes2025-09-28
| | | | | | | Close #35926 Close #35818 Co-authored-by: skewb1k <skewb1kunix@gmail.com> Co-authored-by: glepnir <glephunter@gmail.com>
* fix(docs): include `?` in list items #35945Maria Solano2025-09-28
|
* docs: move editorconfig.txt into plugins.txtJustin M. Keyes2025-09-13
| | | | | | | | | | | It helps to have plugins living in one common area, because it signals to users the mechanisms for controlling them, which are typically driven by keymaps and autocmds rather than builtin options. We can always revisit if plugins.txt gets "too big" (for example, we may want to introduce "project.txt" for the project concept, where editorconfig and 'exrc' are relevant), but for now it's rather unusual for editorconfig.txt to have its own dedicated helpfile.
* docs: lsp, miscJustin M. Keyes2025-09-03
| | | | | | | | | - Problem: It's not clear for new plugin developers that `:help` uses a help-tags file for searching the docs, generated by `:helptags`. - Solution: Hint to the |:helptags| docs for regenerating the tags file for their freshly written documentation. Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
* feat(gen_help_html): generate helptags.json, helptag.html #35442Yochem van Rosmalen2025-08-23
| | | | | | | | | | | Problem: No way to know the html page with the docs of a tag when you only have the tag name. Solution: Generate a helptags.json that maps tags to their locations. Generate a helptag.html page that redirects to the HTML page of the given tag. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(gen_help_html): ASCII art rendering in docs #35262Shashwat Agrawal2025-08-11
| | | | | | | | Problem: gen_help_html.lua script misinterprets parts of ASCII diagrams as help tags (e.g., `|_________|` in `usr_28.txt`). This incorrectly triggered special alignment-fixing logic that is meant for columnar text. Signed-off-by: Shashwat Agrawal <shashwatagrawal473@gmail.com>
* docs: vim.packJustin M. Keyes2025-07-28
|
* docs: api, pack, events, developJustin M. Keyes2025-07-10
|
* docs: rename builtin.txt, eval.txt #34212Phạm Bình An2025-05-30
| | | | | | | | | | | | Problem: Despite the name, `builtin.txt` only includes Vimscript functions, which is confusing, especially to people who only use Lua to configure Nvim Solution: From justinmk's suggestion - Rename `builtin.txt` to `vimfn.txt` - Rename `eval.txt` to `vimeval.txt` - The tags `*builtin.txt*` and `*eval.txt*` should be kept for Vim-patches Closes #33743
* docs: misc #33330Justin M. Keyes2025-04-12
|
* docs: lsp config/commands #33122Justin M. Keyes2025-03-30
| | | fix #33075
* fix(build): vimdoc tags are not validated #32801Justin M. Keyes2025-03-09
| | | | | | | | | Problem: "make lintdoc" is not validating vimdoc (:help) tags. Solution: - Call `lang_tree:parse()` to init the parser. - Load netrw 🤢 explicitly, since it was moved to `pack/dist/opt/`. - Fix invalid help tags.