Skip to content

Commit b9ce44e

Browse files
committed
fix(build): fix nested modules in extras
1 parent cbc6828 commit b9ce44e

7 files changed

Lines changed: 12 additions & 2 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `Init`
1+
# `Typescript`
22

33
<!-- plugins:start -->
44

File renamed without changes.
File renamed without changes.

docs/keymaps.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ possible keymaps starting with `<space>`.
8282
| <code>&lt;leader&gt;dpp</code> | Toggle Profiler | **n** |
8383
| <code>&lt;leader&gt;dph</code> | Toggle Profiler Highlights | **n** |
8484
| <code>&lt;leader&gt;uh</code> | Toggle Inlay Hints | **n** |
85+
| <code>&lt;leader&gt;gg</code> | Lazygit (Root Dir) | **n** |
86+
| <code>&lt;leader&gt;gG</code> | Lazygit (cwd) | **n** |
8587
| <code>&lt;leader&gt;gL</code> | Git Log (cwd) | **n** |
8688
| <code>&lt;leader&gt;gb</code> | Git Blame Line | **n** |
8789
| <code>&lt;leader&gt;gf</code> | Git Current File History | **n** |

lua/build.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ function M.update()
285285
Util.walk(rootLazyVim .. "/lua/lazyvim/plugins/extras", function(path, name, type)
286286
if type == "file" and name:find("%.lua$") then
287287
local modname = path:gsub(".*/lua/", ""):gsub("/", "."):gsub("%.lua$", "")
288+
local index = modname:find("%.init$")
289+
if index then
290+
modname = modname:sub(1, index - 1)
291+
end
292+
288293
local lines = {} ---@type string[]
289294
local title = modname:match("%.([^%.]+)$")
290295
title = title:sub(1, 1):upper() .. title:sub(2)
@@ -320,7 +325,10 @@ They are only shown here for reference.
320325
M.plugins("extras/" .. path:gsub(".*/extras/", "")).content,
321326
"",
322327
})
323-
local md_file = docs .. "/extras/" .. modname:gsub(".*extras%.", ""):gsub("%.", "/", 1) .. ".md"
328+
local md_file = docs .. "/extras/" .. modname:gsub(".*extras%.", ""):gsub("%.", "/", 2) .. ".md"
329+
if index then
330+
md_file = md_file:gsub("%.md$", "/index.md")
331+
end
324332
keep[#keep + 1] = "docs" .. md_file:sub(#docs + 1)
325333
if not vim.loop.fs_stat(md_file) then
326334
local dir = vim.fn.fnamemodify(md_file, ":h")

0 commit comments

Comments
 (0)