Skip to content

Commit

Permalink
Merge pull request #383 from mrjones2014/bot/vimdoc/master
Browse files Browse the repository at this point in the history
chore: generated vimdoc
  • Loading branch information
mrjones2014 committed Jun 23, 2023
2 parents ae8fc55 + 3bec8ea commit d616616
Showing 1 changed file with 54 additions and 2 deletions.
56 changes: 54 additions & 2 deletions doc/legendary.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*legendary.txt* Last change: 2023 June 01
*legendary.txt* Last change: 2023 June 23

==============================================================================
Table of Contents *legendary-table-of-contents*
Expand Down Expand Up @@ -58,6 +58,9 @@ FEATURES *legendary-features*
`legendary.nvim`
- Integration with which-key.nvim <https://github.com/folke/which-key.nvim>,
use your existing `which-key.nvim` tables with `legendary.nvim`
- Integration with lazy.nvim <https://github.com/folke/lazy.nvim>,
automatically load keymaps defined via `lazy.nvim`'s `keys` property on
plugin specs
- Execute normal, insert, and visual mode keymaps, commands, autocommands, and
Lua functions when you select them
- Show your most recently executed items at the top when triggered via
Expand Down Expand Up @@ -116,12 +119,20 @@ With `lazy.nvim`:
{
'mrjones2014/legendary.nvim',
version = 'v2.1.0',
-- since legendary.nvim handles all your keymaps/commands,
-- its recommended to load legendary.nvim before other plugins
priority = 10000,
lazy = false,
-- sqlite is only needed if you want to use frecency sorting
-- dependencies = { 'kkharji/sqlite.lua' }
}
-- or, to get rolling updates
{
'mrjones2014/legendary.nvim',
-- since legendary.nvim handles all your keymaps/commands,
-- its recommended to load legendary.nvim before other plugins
priority = 10000,
lazy = false,
-- sqlite is only needed if you want to use frecency sorting
-- dependencies = { 'kkharji/sqlite.lua' }
}
Expand All @@ -142,7 +153,43 @@ With `vim-plug`:
QUICKSTART *legendary-quickstart*


Register keymaps through setup:
If you use lazy.nvim <https://github.com/folke/lazy.nvim> for your plugin
manager, `legendary.nvim` can automatically register keymaps defined via the
`keys` property of `lazy.nvim` plugin specs. This lets you keep your
plugin-specific keymaps where you define the plugin, and `legendary.nvim`
automatically detects them. For example:

>lua
-- in a plugin spec:
{
'folke/flash.nvim',
keys = {
{
's',
function()
require('flash').jump()
end,
mode = { 'n', 'x', 'o' },
desc = 'Jump forwards',
},
{
'S',
function()
require('flash').jump({ search = { forward = false } })
end,
mode = { 'n', 'x', 'o' },
desc = 'Jump backwards',
},
},
}

-- where you set up legendary.nvim
-- now the keymaps from the `flash.nvim` plugin spec will be automatically loaded
require('legendary').setup({ lazy_nvim = { auto_register = true } })
<
Otherwise, register keymaps, commands, autocmds, and functions through setup,
including opting into _extensions_ which can automatically load keymaps and
commands from other plugins:

>lua
require('legendary').setup({
Expand Down Expand Up @@ -413,6 +460,11 @@ doc/table_structures/README.md <./doc/table_structures/README.md>.
max_timestamps = 10,
},
},
lazy_nvim = {
-- Automatically register keymaps that are defined on lazy.nvim plugin specs
-- using the `keys = {}` property.
auto_register = false,
},
which_key = {
-- Automatically add which-key tables to legendary
-- see ./doc/WHICH_KEY.md for more details
Expand Down

0 comments on commit d616616

Please sign in to comment.