diff --git a/doc/legendary-extensions.txt b/doc/legendary-extensions.txt index 45bb7c35..958906bb 100644 --- a/doc/legendary-extensions.txt +++ b/doc/legendary-extensions.txt @@ -1,10 +1,12 @@ -*legendary-extensions.txt* Last change: 2023 April 10 +*legendary-extensions.txt* Last change: 2023 October 10 ============================================================================== Table of Contents *legendary-extensions-table-of-contents* Extension API ........................... |legendary-extensions-extension-api| Built-in Extensions ............... |legendary-extensions-built-in-extensions| +`Lazy.nvim` ................................. |legendary-extensions-lazy.nvim| +`Which-Key.nvim` ....................... |legendary-extensions-which-key.nvim| `nvim-tree.lua` ......................... |legendary-extensions-nvim-tree.lua| `smart-splits.nvim` ................. |legendary-extensions-smart-splits.nvim| `op.nvim` ..................................... |legendary-extensions-op.nvim| @@ -15,7 +17,8 @@ EXTENSIONS *legendary-extensions-extensions* - Extensions <#extensions> - Extension API <#extension-api> - Built-in - Extensions <#built-in-extensions> - `nvim-tree.lua` <#nvim-treelua> - + Extensions <#built-in-extensions> - `Lazy.nvim` <#lazynvim> - + `Which-Key.nvim` <#which-keynvim> - `nvim-tree.lua` <#nvim-treelua> - `smart-splits.nvim` <#smart-splitsnvim> - `op.nvim` <#opnvim> - `diffview.nvim` <#diffviewnvim> **Note** The internal extension API is considered unstable, as it will likely @@ -81,6 +84,49 @@ BUILT-IN EXTENSIONS *legendary-extensions-built-in-extensions* +`LAZY.NVIM` *legendary-extensions-lazy.nvim* + +Automatically load key mappings defined in lazy.nvim + plugin specs into `legendary.nvim`. + +>lua + require('legendary').setup({ + lazy_nvim = true, + }) +< + + +`WHICH-KEY.NVIM` *legendary-extensions-which-key.nvim* + +Automatically load key mappings defined by which-key.nvim + into `legendary.nvim`. + +>lua + require('legendary').setup({ + extensions = { + which_key = { + -- Automatically add which-key tables to legendary + -- see WHICH_KEY.md for more details + auto_register = false, + -- you can put which-key.nvim tables here, + -- or alternatively have them auto-register, + -- see WHICH_KEY.md + mappings = {}, + opts = {}, + -- controls whether legendary.nvim actually binds they keymaps, + -- or if you want to let which-key.nvim handle the bindings. + -- if not passed, true by default + do_binding = true, + -- controls whether to use legendary.nvim item groups + -- matching your which-key.nvim groups; if false, all keymaps + -- are added at toplevel instead of in a group. + use_groups = true, + }, + }, + }) +< + + `NVIM-TREE.LUA` *legendary-extensions-nvim-tree.lua* Automatically load keymaps and commands for the `NvimTree` buffer into diff --git a/doc/legendary-which-key.txt b/doc/legendary-which-key.txt index 732c3cc7..a0d28f50 100644 --- a/doc/legendary-which-key.txt +++ b/doc/legendary-which-key.txt @@ -1,4 +1,4 @@ -*legendary-which-key.txt* Last change: 2022 November 03 +*legendary-which-key.txt* Last change: 2023 October 10 ============================================================================== `WHICH-KEY.NVIM` INTEGRATION *legendary-which-key-which-key.nvim`-integration* @@ -32,7 +32,7 @@ There's a couple ways you can choose to do it: -- or, if you'd prefer to manually register with legendary.nvim require('which-key').register(your_which_key_tables, your_which_key_opts) - require('legendary.integrations.which-key').bind_whichkey( + require('legendary.util.which-key').bind_whichkey( your_which_key_tables, your_which_key_opts, -- false if which-key.nvim handles binding them, diff --git a/doc/legendary.txt b/doc/legendary.txt index cb8feb26..3b617d86 100644 --- a/doc/legendary.txt +++ b/doc/legendary.txt @@ -1,4 +1,4 @@ -*legendary.txt* Last change: 2023 July 07 +*legendary.txt* Last change: 2023 October 10 ============================================================================== Table of Contents *legendary-table-of-contents* @@ -90,10 +90,7 @@ FEATURES *legendary-features* <./doc/API.md#converting-keymaps-from-vimscript>) - Anonymous mappings; show mappings/commands in the finder without having `legendary.nvim` handle creating them -- Extensions to automatically load keymaps and commands from other plugins - - The internal extension API is considered unstable, as it will likely need to - evolve as we add extensions for additional plugins with different setups. - This mostly affects plugin developers, not users. +- Extensions to automatically load keymaps and commands from other plugins ------------------------------------------------------------------------------ PREREQUISITES *legendary-prerequisites* diff --git a/doc/tags b/doc/tags index 130b880b..80001634 100644 --- a/doc/tags +++ b/doc/tags @@ -12,10 +12,12 @@ legendary-extensions-built-in-extensions legendary-extensions.txt /*legendary-ex legendary-extensions-diffview.nvim legendary-extensions.txt /*legendary-extensions-diffview.nvim* legendary-extensions-extension-api legendary-extensions.txt /*legendary-extensions-extension-api* legendary-extensions-extensions legendary-extensions.txt /*legendary-extensions-extensions* +legendary-extensions-lazy.nvim legendary-extensions.txt /*legendary-extensions-lazy.nvim* legendary-extensions-nvim-tree.lua legendary-extensions.txt /*legendary-extensions-nvim-tree.lua* legendary-extensions-op.nvim legendary-extensions.txt /*legendary-extensions-op.nvim* legendary-extensions-smart-splits.nvim legendary-extensions.txt /*legendary-extensions-smart-splits.nvim* legendary-extensions-table-of-contents legendary-extensions.txt /*legendary-extensions-table-of-contents* +legendary-extensions-which-key.nvim legendary-extensions.txt /*legendary-extensions-which-key.nvim* legendary-extensions.txt legendary-extensions.txt /*legendary-extensions.txt* legendary-features legendary.txt /*legendary-features* legendary-filters-built-in-filters legendary-filters.txt /*legendary-filters-built-in-filters*