Skip to content

Commit 1520d51

Browse files
committed
fix(mini.nvim): ensure freshly generated helptags
Details: - Always trying to reuse helptags means that newly added tags in help files are not recognized (they are not regenerated into 'tags' file).
1 parent a740dd7 commit 1520d51

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

_scripts/util.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ end
2222

2323
M.get_help_tags = function(tags_path)
2424
tags_path = tags_path or '_deps/mini.nvim/doc/tags'
25-
if vim.uv.fs_stat(tags_path) == nil then vim.cmd('helptags _deps/mini.nvim/doc') end
25+
26+
-- Ensure freshly genereated helptags
27+
vim.fs.rm(tags_path)
28+
vim.cmd('helptags _deps/mini.nvim/doc')
2629

2730
local tags = {}
2831
for _, l in ipairs(vim.fn.readfile(tags_path)) do

mini.nvim/doc/mini-files.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ A file system entry data is a table with the following fields:
807807

808808
`content.highlight` describes how file system entry name should be highlighted.
809809
Takes file system entry data as input and returns a highlight group name.
810-
Uses [MiniFiles.default\_highlight()](https://neovim.io/doc/user/helptag.html?tag=MiniFiles.default_highlight\(\)) by default.
810+
Uses [MiniFiles.default\_highlight()](mini-files.qmd#minifiles.default_highlight) by default.
811811

812812
`content.prefix` describes what text (prefix) to show to the left of file
813813
system entry name (if any) and how to highlight it. It also takes file

mini.nvim/doc/mini-misc.qmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Features the following functions:
1818
Useful in combination with `stat_summary()`.
1919

2020

21-
- [MiniMisc.log\_add()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_add\(\)), [MiniMisc.log\_show()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_show\(\)) and other helper functions to work
21+
- [MiniMisc.log\_add()](mini-misc.qmd#minimisc.log_add), [MiniMisc.log\_show()](mini-misc.qmd#minimisc.log_show) and other helper functions to work
2222
with a special in-memory log array. Useful when debugging Lua code.
2323

2424

@@ -162,7 +162,7 @@ Each entry is a table with the following fields:
162162

163163
- <span class="help-syntax-keys">\<timestamp\></span> `(number)` - a timestamp of when the entry was added. A number of
164164
milliseconds since the in-memory log was initiated (after [MiniMisc.setup()](mini-misc.qmd#minimisc.setup)
165-
or [MiniMisc.log\_clear()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_clear\(\))). Useful during profiling.
165+
or [MiniMisc.log\_clear()](mini-misc.qmd#minimisc.log_clear)). Useful during profiling.
166166

167167
#### Parameters {#minimisc.log_add-parameters}
168168

@@ -195,11 +195,11 @@ Each entry is a table with the following fields:
195195

196196

197197

198-
- [MiniMisc.log\_get()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_get\(\)) to get log array
198+
- [MiniMisc.log\_get()](mini-misc.qmd#minimisc.log_get) to get log array
199199

200-
- [MiniMisc.log\_show()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_show\(\)) to show log array in the dedicated buffer
200+
- [MiniMisc.log\_show()](mini-misc.qmd#minimisc.log_show) to show log array in the dedicated buffer
201201

202-
- [MiniMisc.log\_clear()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_clear\(\)) to clear the log array
202+
- [MiniMisc.log\_clear()](mini-misc.qmd#minimisc.log_clear) to clear the log array
203203

204204
---
205205

@@ -217,7 +217,7 @@ Get log array
217217

218218

219219

220-
- [MiniMisc.log\_add()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_add\(\)) to add to the log array
220+
- [MiniMisc.log\_add()](mini-misc.qmd#minimisc.log_add) to add to the log array
221221

222222
---
223223

@@ -230,7 +230,7 @@ Show log array in a scratch buffer
230230

231231

232232

233-
- [MiniMisc.log\_add()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_add\(\)) to add to the log array
233+
- [MiniMisc.log\_add()](mini-misc.qmd#minimisc.log_add) to add to the log array
234234

235235
---
236236

@@ -245,7 +245,7 @@ This also sets a new starting point for entry timestamps.
245245

246246

247247

248-
- [MiniMisc.log\_add()](https://neovim.io/doc/user/helptag.html?tag=MiniMisc.log_add\(\)) to add to the log array
248+
- [MiniMisc.log\_add()](mini-misc.qmd#minimisc.log_add) to add to the log array
249249

250250
---
251251

0 commit comments

Comments
 (0)