commit 805dd5d0478011dbfda4037b3778fb211cf7b620
parent e084a99040dbfae5bc71bc2f5ea9b9933ce7b61c
Author: bfredl <bjorn.linse@gmail.com>
Date: Wed, 10 Sep 2025 12:22:31 +0200
fix(gen): prevent "make doc" failure due to temporary files
Notably, the existence of a swap file like .buffer.c.swp might cause
mayhem. As a reasonable filter, only process *.c and *.h files using the
c grammar.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gen/gen_eval_files.lua b/src/gen/gen_eval_files.lua
@@ -178,7 +178,7 @@ local function get_api_meta()
--- @type table<string,nvim.cdoc.parser.fun>
local functions = {}
for path, ty in vim.fs.dir(f) do
- if ty == 'file' then
+ if ty == 'file' and (vim.endswith(path, '.c') or vim.endswith(path, '.h')) then
local filename = vim.fs.joinpath(f, path)
local _, funs = cdoc_parser.parse(filename)
for _, fn in ipairs(funs) do