diff --git a/gen_doc.fnl b/gen_doc.fnl index ab8ab6d..7e6d369 100644 --- a/gen_doc.fnl +++ b/gen_doc.fnl @@ -26,6 +26,8 @@ (let [len (length str)] (.. str (string.rep " " (- max len))))) +(local mapping-struct-header {:bepo :Bepo :modes :Modes :qwerty :Qwerty}) + (fn print-mapping-struct [struct] (match struct {: bepo : modes : qwerty} @@ -89,22 +91,31 @@ in each group. “Modes” have the same meaning as in the |map-table|. ") (let [tbl (collect [name docstruct (pairs bepo)] - (if (= name :setup) - nil - (values name docstruct)))] + (if (= name :setup) nil + (= (type docstruct) :table) (values name docstruct) + (error (.. "Invalid type for " name))))] (do (table.sort tbl) (each [name docstruct (pairs tbl)] (do + (var need-header true) + (fn print-header [] + (do + (print-mapping-struct mapping-struct-header) + (set need-header false))) + (----) (print-lua-import name) (-?> docstruct (?. :docstring) print) (print "") (if (> (length docstruct.body) 0) - (print-mapping-struct {:bepo :Bepo :modes :Modes :qwerty :Qwerty})) - (each [_ mapping-struct (pairs docstruct.body)] + (print-header)) + (each [i mapping-struct (pairs docstruct.body)] + (if need-header (print-hedear)) (match mapping-struct - {:comment c} (print c) + {:comment c} (do + (print (.. "\n" c)) + (set need-header true)) _ (print-mapping-struct mapping-struct))) (print ""))))) diff --git a/help/bepo-nvim.txt b/help/bepo-nvim.txt index c1c6de9..14c54a9 100644 --- a/help/bepo-nvim.txt +++ b/help/bepo-nvim.txt @@ -62,17 +62,6 @@ require("bepo").window() *bepo.nvim-windo n wé t n wÉ T --------------------------------------------------------------------------------- -require("bepo").tabs() *bepo.nvim-tabs* -le couple [gb]/[gé] agit sur les tabs - - Modes Bepo Qwerty - n gb gT - n gé gt - n gB :execute "silent! tabfirst" - n gÉ :execute "silent! tablast" - n gT - -------------------------------------------------------------------------------- require("bepo").movement() *bepo.nvim-movement* on préserve {hjkl} pour les directions @@ -118,5 +107,16 @@ require("bepo").easy_access() *bepo.nvim-easy_acces ox ié iw ox iÉ iW +-------------------------------------------------------------------------------- +require("bepo").tabs() *bepo.nvim-tabs* +le couple [gb]/[gé] agit sur les tabs + + Modes Bepo Qwerty + n gb gT + n gé gt + n gB :execute "silent! tabfirst" + n gÉ :execute "silent! tablast" + n gT + vim:tw=78:ts=8:ft=help:norl: