Skip to content

Conversation

@alex-courtis
Copy link
Member

@alex-courtis alex-courtis commented Feb 3, 2026

Generate is failing for users: #3244 (comment)

Looks like I made two bad assumptions:

  • gen_vimdoc.lua runs #!/usr/bin/env -S nvim -l which is the system installed nvim, with possibly different compiled RTPs when versions are different
  • nvim 0.10 source has gen_vimdoc.lua and luacats_parser.lua in the scripts directory, which was moved to gen/src in 0.11.

After tweaking, it does run with 0.10, however the results are a bit different: looks like a couple of bugs were fixed in the generator.

Conservative fix:

  • expect v0.11 + sources
  • Don't invoke gen_vimdoc.lua directly, use the nvim make doc to execute it, using the built executable
  • Unified genation and lint into scripts/vimdoc.sh

mkdir -p "${DIR_NVIM_SRC}"
curl -L "https://github.com/neovim/neovim/archive/refs/tags/${{ matrix.nvim_version }}.tar.gz" | tar zx --directory "${DIR_NVIM_SRC}/.."
cd "${DIR_NVIM_SRC}"
make doc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that doc is successful without our changes for easier diagnosis.


set -e

if [ $# -ne 1 ] || [ "${1}" != "doc" ] && [ "${1}" != "lintdoc" ]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the nvim make targets.

@przepompownia
Copy link
Collaborator

make help-check works here for me using Nvim on the master branch.

@alex-courtis
Copy link
Member Author

make help-check works here for me using Nvim on the master branch.

Many thanks!

@alex-courtis alex-courtis changed the title docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute docs(#3088): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute Feb 3, 2026
@alex-courtis alex-courtis merged commit 8f30a4a into 3088-gen_vimdoc-api-3231-remove-api-requires Feb 3, 2026
5 checks passed
@alex-courtis alex-courtis deleted the 3088-fix-and-unify-doc-generate-and-lint branch February 3, 2026 03:40
alex-courtis added a commit that referenced this pull request Feb 12, 2026
…p API, lazy load API before setup, rename some API in a non-breaking manner (#3244)

* doc(#2934): POC to use gen_vimdoc.lua for decorator meta

* doc(#2934): use injected gen_vimdoc.lua from nvim source, move decorators to main help

* doc(#2934): tidy and harden scripts

* doc(#2934): add nvim_tree.Config meta classes, add nvim_tree.api. meta classes

* doc(#2934): add nvim_tree.Config to help

* doc(#2934): add nvim_tree.api classes to help

* doc(#2934): tidy and correct nvim_tree.Config.UI and nvim_tree.Config.Actions

* doc(#2934): tidy and correct nvim_tree.Config.HijackDirectories, format and order nvim_tree.Config

* doc(#2934): tidy and nvim_tree.Config top level

* doc(#2934): tidy and format nvim_tree.Config.LiveFilter, Modified, Tab, Trash

* doc(#2934): tidy and format nvim_tree.Config.FilesystemWatchers, Log

* doc(#2934): split nvim_tree.Config into files, Sort and HijackDirectories populate others placeholder

* doc(#2934): more generic gen_vimdoc_config module config

* doc(#2934): tidy Config.HijackDirectories and Actions, move them into place

* doc(#2934): tidy Config.Modified, move into place

* doc(#2934): tidy Config.LiveFilter, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.Trash, move into place

* doc(#2934): tidy Config.Tab, move into place

* doc(#2934): tidy Config.UI, move into place

* doc(#2934): tidy Config.Log, move into place

* doc(#2934): tidy Config.Notify, move into place

* doc(#2934): tidy Config.SystemOpen, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Help, move into place

* doc(#2934): tidy Config.Diagnostics, move into place

* doc(#2934): remove api/decorator as they are out of scope, revert api_decorator.lua changes, retain api opts classes but make them exact

* doc(#2934): tidy Config.Filters, move into place

* doc(#2934): tidy Config.FilesystemWatchers, move into place

* doc(#2934): tidy Config.FilesystemWatchers, Git, move into place

* doc(#2934): tidy Config.UpdateFocusedFile, move into place

* doc(#2934): tidy Config.Sort, move into place

* doc(#2934): tidy Config.View, move into place

* doc(#2934): tidy Config.View, move into place

* docs(#2934): type DEFAULT_OPTS, use bracketed references to keep luals happy

* docs(#2934): tidy, inline some classes

* docs(#2934): tidy Config.Renderer

* docs(#2934): remove problematic glyphs, tidy other glyphs

* docs(#2934): tidy Config.Renderer, ensure functions are parenthesised when necessary

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.Renderer, move into place

* docs(#2934): tidy Config.Renderer

* docs(#2934): tidy Config.FilesystemWatchers

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): fix broken links

* docs(#2934): refer to nvim in help, not neovim, as this trips the lintdoc spell checker

* docs(#2934): fix broken links

* docs(#2934): add lintdoc.sh, fix some branding spelling

* docs(#2934): update old config links

* docs(#2934): remove 5. Opts, 8.2  Highlight: Overhaul, 15.1  Index: Opts, update links as needed

* docs(#2934): remove indices

* docs(#2934): add bookmarks, put long descriptions into @brief

* docs(#2934): move hidden display to verbatim new section

* docs(#2934): add config lsp examples, link setup

* docs(#2934): normalise heading formatting, remove TOC

* docs(#2934): move all icon and highlight info into a table

* docs(#2934): move all icon and highlight info into a new section

* docs(#2934): normalise all icon and highlight

* docs(#2934): extract nvim_tree.Config field descriptions to class overview

* docs(#2934): consistent string formatting

* docs(#2934): normalise all icon and highlight

* docs(#2934): remove @Briefs as they are shown above the class tag

* docs(#2934): don't <pre> filters

* docs(#2934): add experimental example

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): add gen_vimdoc.sh to CI

* docs(#2934): temporarily --ignore-blank-lines during help check

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): add lintdoc.sh to CI

* docs(#2934): move Nvim build and help-check to the end for faster turnaround

* docs(#2934): use make lintdoc target directly

* docs(#2934): CONTRIBUTING.md updates for help generation and lint

* docs(#2934): revert API opts classes changes

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): harden gen and lint scripts, moving things out of nvim-tree source to prevent luals upset

* docs(#2934): fix lintdoc make target

* docs(#3088): extract api/tree.lua

* docs(#3088): extract api/tree.lua

* docs(#2934): move help diff check after lint

* docs(#3088): update api.tree references, remove old doc

* docs(#3088): extract api/config/mappings.lua

* docs(#3088): api.config.mappings -> api.map

* docs(#3088): extract api/filter.lua

* docs(#3088): move api.git into api.tree

* docs(#3088): extract api/health.lua, tidy formatting

* docs(#3088): extract api/health.lua, tidy formatting

* docs(#3088): remove command descriptions, show lua, link to api

* docs(#3088): extract api/marks.lua

* docs(#3088): remove completed legacy api.lua members

* docs(#3088): extract api/events.lua

* docs(#3088): extract api/events.lua

* docs(#3088): extract api/fs.lua

* docs(#3088): extract api/commands.lua

* docs(#3088): extract api/node.lua functions, doc TODO

* docs(#3088): move all nvim-tree-api to generated doc

* docs(#3088): old api is now impl, use new api

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions, doc WIP

* docs(#3088): extract api/node.lua functions

* docs(#3088): move api into _meta

* docs(#3088): move api-impl out of meta, restore it to its original state with a hyrdrate function

* docs(#3088): remove old Api classes, rename impl Api -> api

* docs(#3088): tidy migrated annotations

* docs(#3088): format nvim_tree.api.commands

* docs(#3088): separate api classes at the end

* docs(#3088): polish vimdoc config

* docs(#3088): format

* docs(#2934): polish vimdoc config

* docs(#2934): snake case config class names

* docs(#2934): snake case config alias names

* docs(#2934): note help tag prefixes

* docs(#2934): snake case config sections

* docs(#2934): move default config to end

* docs(#2934): move setup doc from config to quickstart and setup

* docs(#2934): index contributing

* docs(#3088): cleanup following merge

* docs(#3088): tidy section names

* docs(#3088): split node.navigate and open, move all filters into api.filter

* docs(#3088): hidden->custom toggle default desc

* docs(#3088): add legacy filter api mappings

* docs(#3088): tidy api meta

* docs(#3088): always exclude meta from luacheck, it doesn't offer anything useful

* docs(#3088): extract fs.copy, fix api node param optionality, move legacy api to legacy.lua

* docs(#3088): correct optionality of nvim_tree.config.view.width fields

* docs(#3088): hydrate API before setup with error functions, with some hydrated with their concrete function, wrap removal TODO

* docs(#3088): remove api impl error wrap

* docs(#3088): split api pre and post, add more comments

* docs(#3088): split api pre and post, add more comments

* docs(#3088): extract post impl functions, lazy some requires

* docs(#3088): lazy api impl requires

* Revert "docs(#3088): lazy api impl requires"

This reverts commit c6ea6c5.

* docs(#3088): minimise api pre following tests

* docs(#3088): move node classes under api with logical order

* docs(#3088): document node and git classes, namespace internal and external git classes, redact node subclasses

* docs(#3088): fix merge issue

* docs(#3088): tidy pre comments

* docs(#3088): collapse node and fs submodules

* docs(#3088): move api help and classes back into api.lua

* docs(#3088): resize command calls api, not view

* docs(#3088): tidy api map names

* docs(#3088): revert api.git refactor, provide deprecated api meta

* docs(#3088): add deprecated api @see

* docs(#3088): class fixes following merge, disable luacheck on scripts

* docs(#3088): Node:should_expand nops

* docs(#3088): fix _git return

* docs(#3088): add meta for legacy api

* docs(#3088): mark deprecated api modules, use proper namespacing for deprecateds

* docs(#3088): gen_vimdoc now uses full paths, requires a patch for a FIXME

* docs(#3088): add vim_gendoc patches

* Revert "docs(#3088): add vim_gendoc patches"

This reverts commit ebb9909.

* Revert "docs(#3088): gen_vimdoc now uses full paths, requires a patch for a FIXME"

This reverts commit ff0184a.

* docs(#3088): split gen_vimdoc_config into chunks to avoid filename clashes, as gen_vimdoc keys sections by filename

* docs(#3088): move legacy api into api.impl.legacy, fixes following testing

* docs(#3088): remove merge leftover

* docs(#3088): tidy contrib

* docs(#3088): clarify backwards compatibility

* docs(#3088): clarify help generation in contributing

* docs(#3088): contributing index

* docs(#3088): help-update.sh -> help-defaults.sh now using a /tmp file to prevent runaway FS updates

* docs(#3088): help-update.sh -> help-defaults.sh now using a /tmp file to prevent runaway FS updates

* docs(#3088): CI runs make lintdoc to avoid muddying help-check with unnecessary build and possible Nvim lint failures

* docs(#3088): unify help and readme, clarify some wording

* docs(#3088): test a readme toc

* docs(#3088): test a readme toc

* docs(#3088): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute (#3260)

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute

* docs(#3241): unify help generation and lint into vimdoc.sh, generation uses nvim source build to execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants